[avalanche] Fix a use after free bug in the peer manager unit tests
Summary: D14825 introduced a new facility to clear the peer set in the tests, however the loop doesn't account for the rehash occuring by the erasal.
Test Plan:
With ASAN:
ninja check-avalanche-peermanager_tests
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D14830