[avalanche] Add the remaining contextual transaction checks to the tx finalization process
Summary:
These contextual (based on block height) checks are currently done in the miner when the block template is generated.
We can move these checks to happen earlier in the process thanks to avalanche preconsensus, and apply them during the tx finalization. This ensures that all the checks are still present after we start mining only the finalized transactions, while offloading them from the miner.
These contextual checks are the last ones remaining since the min feerate and the size checks have been already added.
Note that all these txs would be rejected from the mempool already so the only way to test this is via unit tests.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D18369