ENH: Add check in assert_equal() that __eq__ and __ne__ agree.

Fixes #2552. Compares objects with both methods, tests result.