Add which outputs have been spent by which input using SpentByWriter for the DB and MempoolSpentBy for the mempool.
Add the spent_by field to TxOutput in the protobuf; this uses the OutPoint message, note that this points to an input.
Also add a OutputsSpent helper to query us the required data to tell which outputs have been spent by which tx.
Depends on D13768.