This adds the functional test mempool_expiry.py covering mempool transaction expiry. Both the default DEFAULT_MEMPOOL_EXPIRY of 336 hours (two weeks, set in #9312) and the user definable mempool expiry via the -mempoolexpiry=<n> command line option are tested. The test checks that descendants of expired transactions are removed as well.
Notes for reviewers
LimitMempoolSize()(which is the only caller ofCTxMemPool::Expire()) is only called when a transaction is added to the mempool. In order to test expiry of a transaction-that-should-expire, the mocktime is set and a random transaction is broadcast to triggerLimitMempoolSize(). The transaction-that-should-expire is then checked for expiry. LMK if there is another way, but I don't think there is.