[avalanche] Fix abc_p2p_compactproofs flakiness
Summary:
The loop waiting for the message count to increase is not reliable because the lock has to be released between the calls, so a message can sneak in between and cause a timeout on the next iteration.
This diff updates the test to use a more simple and robust approach.
Test Plan:
./test/functional/test_runner.py abc_p2p_compactproofs
Reviewers: #bitcoin_abc, sdulfari
Reviewed By: #bitcoin_abc, sdulfari
Differential Revision: https://reviews.bitcoinabc.org/D12024