RHIC optics and spin dynamics with snakes and rotators