This commit fires TransactionRemovedFromMempool callbacks from the
mempool and cleans up a bunch of code.
This is a backport of Core PR14384
policyestimator_tests was modified to use TestingSetup because it uses the CTxMemPool::TrimToSize function which now may trigger the signal, but the signals handlers are not setup properly to do so using BasicTestingSetup.