This is a refactor and safe to do because:
* UnloadBlockIndex calls ChainstateManager::Unload, which calls
BlockManager::Unload
* Only unit tests call Unload directly
This is a partial backport of core#23974
https://github.com/bitcoin/bitcoin/pull/23974/commits/fab262174b96854d2df5bee7da578990c9e9cb1e
Depends on D12511