Environmental flucutations induce scale-dependent compensation and increase stability in plankton ecosystems