Large deviations for stochastic processes on Riemannian manifolds