[avalanche] Refactor helpers to build avaproofs messages
Summary:
This refactor makes build_msg_avaproofs more reusable in other tests which
will be leveraged in a future diff. It also cleans up unnecessary and complex
code in abc_p2p_avalanche_remote_proofs which we should discourage copying.
Test Plan:
ninja check-functional
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D17834