Tensor calculus in spherical coordinates using Jacobi polynomials. Part-I: Mathematical analysis and derivations (Journal of Computational Physics: X)