Walgreens books hefty charge as the drugstore chain adjusts the value of struggling clinics