Functional renormalization group study of the interacting resonant level model in and out of equilibrium