Quantum mechanics in Riemannian spacetime. I. Generally covariant Schrödinger equation with relativistic corrections