Fix a bug in the doubletranspose method for non-square matrices (#8316).
Add tests for sparse matrix multiplication that exercise both,
the sortcols and the doubletranspose method.