Initial implementation of the sparse matrix.

@bsoetaer 
Tests pass when the contracts are disabled.
isn't rows an array already? If this is to allow other types then wouldn't rows.to_a be sufficient?