Edited cachematrix for Programming Assignment 2 with comments