Added final solution to cachematrix.R

This repo now contains the final solution to the R Programing assignment 2.