When using an assumedvalid (snapshot) chainstate along with a background
chainstate, we are syncing two very different regions of the chain
simultaneously. If we use the same blockfile space for both of these
syncs, wildly different height blocks will be stored alongside one
another, making pruning ineffective.
This change implements a separate blockfile cursor for the assumedvalid
chainstate when one is in use.
This is a partial backport of core#27596 and core#28562
https://github.com/bitcoin/bitcoin/pull/27596/commits/7fcd21544a333ffdf1910b65c573579860be6a36
https://github.com/bitcoin/bitcoin/pull/28562/commits/82e48d20f1243fb7733e872a29661b151ab5d523
https://github.com/bitcoin/bitcoin/pull/28562/commits/a47fbe7d49e8921214ac159c558ff4ca19f98dce (partial)
Depends on D17895