Properties of nuclear and neutron matter in a relativistic Hartree-Fock theory