back-ported the matrix class from the "matrix-based-transform" and used it to apply global transformation to object container

This should also later help with ticket like #243, #335, and eventually
the melonJS spike implementation