Spin-constrained Hartree-Fock and the generator coordinate method for the 2-site Hubbard model