Add additional useful functions and extend lwcoord type

Adds functions for cubemapping.
Adds zxz rotation matrix functions.
Adds additional matrix multiply functions.
Promotes segment variable in the lwcoord type to long3 instead of int3.
General cleanups.