Added cachematrix.R

added the cache matrix.R file, which is a solution for the peer
reviewed programming assignment of the R programming course.