Functional inequalities on arbitrary Riemannian manifolds