Implementation of CacheMatrix
Adding unit tests