[avalanche] Add a facility for building an compact proofs message in tests
Summary: This removes some of the boilerplate. There is no change in behavior.
Test Plan:
./test/functional/test_runner.py abc_p2p_compactproofs.py
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D11680