[avalanche] Fix a data race where updating availability scores can coincide with initialization of state
Summary:
There is a data race where UpdateAvalancheStatistics() may be called while
m_avalanche_state is being initialized. This patch refactors out the
AvalancheState container which is not that useful since it only saves a few
bytes per peer that does not respond to avalanche polls. The resulting design
is simpler and less error prone.
Depends on D12325
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12355