Lightweight C++ quaternion template/class