Caching the inverse of a matrix

Contains: a function that can cache its inverse and a function to check
if the inverse was calculated and retrieve it.