Update W3C-based DeviceOrientationControls.js + Demo

- Convert from Euler angles to using rotation matrix to avoid gimbal lock.
- Handle common screen orientation changes through transformation matrices.
- General clean-up of code.