Walgreens booked a better-than-expected fiscal first quarter, but the drugstore chain lost $265 million as it closed U.S.