Fix a rare failure in the peermanager tests
Summary:
The randrange() method expects the range to be non zero.
In the peermanager_tests/select_peer_random case the max variable
can be 0 and fail the test. Since we still want to test slot 0, set slot = 0
when max == 0 without calling the randrange() method.
Test Plan:
ninja check-avalanche
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Differential Revision: https://reviews.bitcoinabc.org/D8345