Resurrect SparseRowMatrixFromMap code.

version 1, will be slow again.