cachematrix and cacheSolve functions for inverting a matrix