Complete code

This is the first commit of the completed cachematrix.R code for
programming assignment 2.