[Chronik] Add metadata and schema version to DB
Summary:
- Add a column family meta to store metadata about the DB
- Add a field SCHEMA_VERSION in that CF, which tells us which version the database is
- If the compiled version doesn't match the version in the db, return with an error
Generally, it seems to be a bad idea to allow running an old Chronik version on a new database, unless we define some clear stability guarantees.
The current behavior is very strict, where the version has to match exactly, to prevent invalid states where e.g. the txs in the database are at a different height than the blocks.
Newer Chronik versions could always be more relaxed, and/or allow upgrading the existing database without reindexing.
Test Plan: ninja check-crates, also all the chronik_* functional tests
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D13337