Initial implementation of the sparse matrix.

@bsoetaer 
Tests pass when the contracts are disabled.
We'd need to call allocate first, but other than that it would work.  It wouldn't be wrapped in the contracts decorator, though.