Reduce CTxMemPool constructor call sites
Summary:
This PR reduces the number of call sites where we explicitly construct CTxMemPool. This is done in preparation for later PRs which decouple the mempool module from ArgsManager, eventually all of libbitcoinkernel will be decoupled from ArgsManager.
The changes in this PR:
- Allows us to have less code churn as we modify CTxMemPool's constructor in later PRs
- In many cases, we can make use of existing CTxMemPool instances, getting rid of extraneous constructions
- In other cases, we construct a ChainTestingSetup and use the CTxMemPool there, so that we can rely on the logic in setup_common to set things up correctly
Backport note:
- see D6451 for why the policy_estimator_test suite already uses a TestingSetup (which inherits ChainTestingSetup)
- fixed an inconsistent lock order in a Bitcoin ABC specific test case in mempool_tests
This is a backport of core#25215
Test Plan:
With clang and debug:
ninja all check-all bench-bitcoin
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14902