Self-consistent Markovian embedding of generalized Langevin equations with configuration-dependent mass and a nonlinear friction kernel