R code for creating a matrix inverse cache