This is from my work in my mempool branch. By popular demand, I am porting it over to here. This benchmark is specifically for benchmarking chained_tx eviction (regular eviction is already being benchmarked in a file called `mempool_eviction.cpp`). Notes: To really test pathological eviction in `CTxMemPool` you need to do it with a full mempool (100k+ tx's) of sets of chained tx's (this bench uses sets of 50-tx chains, 2000 of them!). The philosophy behind this bench is that we must design for the worst case when benchmarking here. This benchmark is very heavy in terms of setup cost -- it actually takes a long time to run the setup in order to be able to *properly* bench `CTxMemPool`'s eviction under mempool-pressure circumstances. Most of the time the benchmark is setting up the mempool(s) it will use. The actual iteration code (which is what gets timed) is very minor as compared to the setup. This is because mempool accept is terribly slow in `CTxMemPool` for unconfirmed chains.
Port of bchn#1098.
Depends on D13106.