Impletemted functions for cachematrix

Implemented the createcachematrix and cachesolve functions as per the
assignment.