commented cachematrix.R

assignment 2 from Coursera course.