Observing the localization of light in space and time by ultrafast second-harmonic microscopy