Analyticity of the time dependence of resonance poles: Solving the Friedrichs model with a time-dependent interaction