Swap sign of rotation quaternion if the angle is > 90 degrees.

If the angle between quats is > 90 degrees, interpolation may lead to
quaternions near zero, and this causes huge relative errors after
renormalization. As the rotation represented by a quat is the same as
the one represented by the negative quat, flip the sign of one quaternion,
so the angle is < 90 degrees again.