equals and hashcode tests.

Added the equals and hashcode tests. Documented the tests. Changed
peers from linked list to hash set because peers needs to be unordered..