1) Found and fixed a bug in heapsort -- corner case of only one child not
handled correctly.
2) Modified SparseMatrix::sort to use row index as primary, col index as
secondary.