Implemented cachematrix.R

Implementation of cachematrix.R