Completed cachematrix.R with full comments

Original code submission, but not with extensive comments.