Rewrote libraries, significant camera changes

Rewrote large parts of the vector and matrix libraries, adding
quaternions.  Camera rotation (and soon object rotation) is now
represented using quaternions (mainly to avoid gimbal lock).