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).