refuse to activate a UTXO snapshot if mempool not empty
Summary:
This ensures that we avoid any unexpected conditions inherent in
transferring non-empty mempools across chainstates.
Note that this should never happen in practice given that snapshot
activation will not occur outside of IBD, based upon the height checks
in loadtxoutset.
This is a partial backport of core#27596
https://github.com/bitcoin/bitcoin/pull/27596/commits/bb0585779472962f40d9cdd9c6532132850d371c
Depends on D17897
Test Plan:
ninja all check-all on my dev branch and IBD with assumeutxo
The dev branch has the corresponding functional test from core#29394 (will be added after we backport the loadtxoutset RPC)
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17898