Minor fixes in test. The equals method always returned true.

This commit ensures that the classes we use to test HashMaps and
HashSets in t6196 and t6200 have proper equals and hashCode
methods. (The old equals method returned always true and therefore
hashCode violated its contract).
Merge pull request #3628 from gzm0/test-fix

Minor fixes in test. The equals method always returned true.