[avalanche] Add dump and load functions to save/load the avalanche peers to/from a file
Summary: This diff adds a couple function to save and load peers to/from a file. This will make it possible to dump during shutdown and load upon startup, similar to what is done for the mempool. This is a step toward a faster bootstrap time when starting an avalanche node, especially to make the staking reward decision faster upon restart.
Test Plan:
ninja check-avalanche-peermanager_tests
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Differential Revision: https://reviews.bitcoinabc.org/D14825