Evolutionary coexistence of microbial strains and species in fluctuating environments caused by metabolic interactions