Block Cholesky factorization of infinite matrices and orthonormalization of vectors of functions