Move all the rotation-related free functions to a `RotationWithTranslation` trait.

This is not a very good name though.