Implement cachematrix.R according to the class.coursera.org/rprog-009 peer assignment