Next step toward core#19556
Instead of relying on the mempool global, each chainstate is given a reference to a mempool to keep up to date with the tip (block connections, disconnections, reorgs, ...)
This is a backport of core#19826
Most differences from Core in validation.cpp are explained by D1667, D7203 & D7439.