[Chronik] Fix: "Inconsistent mempool" when reorging with chained txs
Summary:
Currently, Chronik crashes when disconnecting a block with children in the mempool, because the order of removal of transactions in the node is not in reverse topological order.
This problem was introduced in D13133, specifically where TransactionRemovedFromMempool is called in topological order (i.e. parents first), but should've been called in reverse-topological order (i.e. children first), which this diff fixes.
Chronik depends on the removal to happen in reverse-topological order (i.e. children first), otherwise, it might remove UTXOs from the index before they're added, crashing the node. This is what happened a few times on both NNG and in-node Chronik.
Test Plan: ./test/functional/test_runner.py chronik_tx_removal_order
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14939