use local chainman in peermanager_tests
Summary:
To remove usages of the global chainman in peermanager_tests, pass a reference to the active chainstate to two static functions who need it.
Depends on D11703
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D11737