[Chronik] Add /script/:type/:payload/utxos HTTP endpoint
Summary:
Allows to query the UTXOs of a script. This endpoint has no pagination as there's no obvious way to do it.
However, this endpoint is very fast, as it never reads the full tx off the disk, it only reads txid, block_height and is_coinbase, the remaining data is stored in the UTXOs (out_idx and value).
To decrease the size of ScriptUtxo protobuf messages, it doesn't contain the script directly (which would be the same for all UTXOs in the query anyway). Instead, it's in ScriptUtxos, for all UTXOs.
The allocated vector for the resulting UTXOs slightly over-allocates, by the number of DB UTXOs spent in the mempool. This could be fixed by counting the DB UTXOs spent in the mempool, but the added complexity doesn't seem worth it.
Test Plan: ninja && ./test/functional/test_runner.py chronik_script_utxos
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D13763