[Chronik] Add Group and GroupHistoryReader/-Writer to index the tx history of a group
Summary:
A group can be "address", or "SLP token ID" or other protocols.
This struct allows us to conveniently and generically index the tx history of all such groups. The legacy Chronik indexer only allowed indexing by script/address, however, many people have been asking to add support to index by other predicates.
Since the tx history for some addresses is already +1M, we store the history paginated. This also allows APIs to more easily and efficiently serve paginated tx history.
Txs can be grouped by implementing Group on some struct, which then receives GroupQuerys, and returns Members, which are then grouped and sorted into the DB.
Depends on D13498.
Test Plan: ninja check-crates
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D13487