matrix: Add to/from affine transformation conversion

In order to integrate Graphene with other, commonly used 2D libraries,
we need to have entry points that allow us to convert between affine
transformation matrices and our 3D transformation ones.