Masers as evolutionary tracers of high-mass star formation