Fix a *lot* of brokenness in the mat4 and quaternion code