Hartree-Fock-Roothaan wavefunctions for diatomic molecules: I. First- and second-row hydrides AH, AH±, and AH∗