Fixed the all_equal/all_unequal for sparse matrices.
Yet another fix to all_equal() for sparse matrices.
Update the tests to take into account the new comparison functions