On the total curvature of knots in Riemannian manifolds