[avalanche] Add a way to count the number of proofs in a ProofPool
Summary:
This is the first piece needed in order to cap the size of proof pools by the
number of proofs. A simple cache of the proof count is provided to short
circuit the O(n) loop if nothing in the pool has changed.
Test Plan:
ninja check-avalanche
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D11561