These functions cache the inverse of a matrix.
The functions are adapted from makeVector and cachemean.