[avalanche] Promote stake contenders when the chain tip updates
Summary:
Every time the chain tip updates, we need to "promote" stake contender cache entries in order to continue to track contender payout scripts and proof scores. Every time we do this, we grow the cache, so cleanup needs to be done on this cadence as well. This patch integrates that cache promotion into the Processor, trims the cache accordingly, and adds the -avalanchestakingpreconsensus option to enable this behavior. This same flag will be used to enable avalanche voting on contenders in future patches.
Depends on D17024
Test Plan:
ninja check-avalanche-processor_tests
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17027