Update and rename matrices.h to matrixd.h

Changed the name, and made the following changes:

Better const correctness.
Templated vectors.
Optional double precision.
Removed stdlib dependency.
Added literal matrix constructors.
Added short vectors.

And more! This is overall quite a big update, hence the name change. Enjoy! ^_^