added indmax and indmin for sparse matrices.

fixes #7577