Position-dependent memory kernel in generalized Langevin equations: Theory and numerical estimation.