inverse matrix cache

Implementation of a caching matrix object for inverse matrix
calculations.