Mempool resurrect test

Simple regression test for the memory pool code that takes transactions confirmed in blocks and puts them back into the memory pool when re-orging away from those blocks.

Builds on #5316