Implement makeCacheMatrix and solveCache