Make HashSet behave like std::unordered_set...

... instead of std::unordered_multiset. The old behavior is
unexpected and error prone. CompilerDriver's attempts to
prune image classes can fail due to this discrepancy.

Also avoid using std::iterator<> as it has been deprecated
in C++17. Note that we erroneously used it as a private base
class rather that public, so it was not working anyway.

Test: Add/update tests in hash_set_test.
Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: Iaf459724562184cac6915e2b1e0b849371de8b53
2 files changed