Fluctuating environments drive insect swarms into a new state that is robust to perturbations