Spin rotation of the forward transmitted beam in neutron diffraction by perfect magnetic crystals