[Chronik] Add avalanche support
Summary:
Add is_final to BlockInfo and BlockMetadata, signifying whether the block has been finalized by Avalanche. Encapsulate the state in an Avalanche struct in the indexer, which would also allow us to store the state of finalized transactions.
We store the height of the last finalized block in the indexer (in RAM), and update the height on BlockFinalized from CValidationInterface.
Nomenclature: is_final instead of is_finalized, to be in line with the isfinalblock RPC.
We assume that disconnects are either on non-finalized blocks or on the last finalized block.
Depends on D13693.
Test Plan: ninja && ./test/functional/test_runner.py chronik_avalanche
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D13626