Rewrite SpinTaylorF2 to more closely match the current version of TaylorF2.

Also optimize some functions, add some error checking for corner cases, and match TaylorF2's handling of f_ref.