cache matrix inversion

Two functions that are used to create a special object that stores a
numeric squared matrix and caches its inverse.