[avalanche tests] implement AvalancheProof serialization
This diff implements a proper serialization and deserialization for the
AvalancheProof object in the test framework, so we can inspect more in
details the data contained in the proof shared by a node and print a more
user-friendly representation of it.
Based on code from abandoned diff D9341.
Depends on D9360.
The unit test added in D9360 ensures that a proof remains unchanged
after a serialization-deserialization round-trip.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D9363