Memory in Bacterial Adaptations to Fluctuating Stress