[Chronik] Add /token-id/... endpoints
Summary:
For some applications (e.g. the explorer or token airdrops), it is helpful to have an endpoint that returns txs/UTXOs with a given token ID.
We add these HTTP endpoints:
- /token-id/:token_id/confirmed-txs
- /token-id/:token_id/history
- /token-id/:token_id/unconfirmed-txs
- /token-id/:token_id/utxos
Since have a generic implementation that allows us to easily group txs, this now becomes really easy, we simply add TokenIdGroup, implement Group on it and use the generic group writer + mempool to index txs by token ID.
The only tricky part is getting the auxillary data for the group, which can come from 3 different sources (for BlockConnected: from ProcessedTokenTxBatch, for BlockDisconnected: from the DB, for mempool inserts/removals: from the mempool).
Test Plan: ninja && ./test/functional/test_runner.py chronik_token_id_group
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D15386