Spin-orbit coupling in a relativistic Hartree model for finite nuclei