Programming assignment for Coursera's R course. Cached version of the solve() function.