Theory of out-of-equilibrium electron and phonon dynamics in metals after femtosecond laser excitation