[avalanche] Compute a node activity score
Summary:
This score reflects the node activity over the last invs polled. It ranges between 0 and 100 so it can be easily expressed as a percentage.
This score can be used for determining which node is the most reliable in a peer and protect it from eviction.
Ref T1634.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Maniphest Tasks: T1634
Differential Revision: https://reviews.bitcoinabc.org/D9839