Initial implementation of the sparse matrix.

@bsoetaer 
Tests pass when the contracts are disabled.
Not very often, it turns out, but whenever it can treat its rows as an array of vectors.