Endogenous oxidative stress produces diversity and adaptability in biofilm communities