This improvement shaves off almost one minute on my machine for one of the longest functional test.
Before:
```
$ testr.py mempool_updatefr*
Starting Bitcoin ABC functional tests
mempool_updatefromblock.py started
Running jobs: mempool_updatefromblock.py
mempool_updatefromblock.py passed, Duration: 277 s
```
After:
```
$ testr mempool_updatefr*
Starting Bitcoin ABC functional tests
mempool_updatefromblock.py started
Running jobs: mempool_updatefromblock.py
mempool_updatefromblock.py passed, Duration: 219 s
```
This is a single commit from core#22707. The other commits still have unbackported dependencies.