Phase Locking the Spin Precession in a Storage Ring