Initial implementation of the sparse matrix.

@bsoetaer 
Tests pass when the contracts are disabled.
Turns out setting `@@evaluating_contracts` here fixed the problem.  I have no idea why, but it's obviously the right thing to do, regardless.