Replace intrinsic ROTATE macros with an inline.

Without the cast/mask, the compiler is allowed to optimize this directly
to the correct CPU intrinsic for rotate.