Implementation of matrix object with cached inverse.
Submission for rprog-007 Programming Assignment 2.