Epigenetic switching as a strategy for quick adaptation while constraining biochemical noise