Initial implementation of the sparse matrix.

@bsoetaer 
Tests pass when the contracts are disabled.
This is consistent with what the built-in vector class does.