The theory and computational implementation of quadratically convergent Hartree-Fock orbital optimization methods and their relationship to the time-dependent Hartree-Fock and RPA methods