R: PA2: Caching the inverse of a matrix