Comparative study of many-body perturbation theory and time-dependent density functional theory in the out-of-equilibrium Anderson model