Initial implementation of the sparse matrix.

@bsoetaer 
Tests pass when the contracts are disabled.
Name mismatch: indices_or_nil down here while the method is actually called indices_or_null