Add TypeTensor::inverse() and unit test

This branch is a corollary to #420, it uses @dknez's code for computing the 3x3 inverse that was removed from that PR.

We didn't have any unit tests for TypeTensor prior to this... so this initial commit should definitely be expanded on!