Optims in NumberGrid, Matrix4, and TextLayer.

- Mostly loop unrolling, inplace multiplications, etc.