[META] In the next commit, we move the clearing of fHavePruned to BlockManager::Unload()
This is a partial backport of [[https://github.com/bitcoin/bitcoin/pull/24909 | core#24909]]
https://github.com/bitcoin/bitcoin/pull/24909/commits/3308ecd3fc254ee4ef9f803c09f00ba4dc968520
Depends on D13045