[Chronik] Add SpentByWriter and SpentByReader
Summary:
This is necessary if we want to add to each output of a tx which tx (and input) spent it. We need to index this, because a node by itself doesn't store which output has been stored by which input.
This is especially important for block explorers, to allow navigating to the tx that spent an output.
We do this by storing for each tx (which has any spent outputs) a list of "spent-by" entries. Each entry tells us which output of that tx has been spent, which tx_num spent it and which input of the spending tx spent the output.
Test Plan: ninja check-crates
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D13756