Clear pindexBestHeader in ChainstateManager::Unload()
Summary:
Code Reviewer Notes
Call graph of relevant functions:
UnloadBlockIndex() <-- Moved from
calls ChainstateManager::Unload() <-- Moved to
Safe because ChainstateManager::Unload() is called only by
UnloadBlockIndex() and no other callers.
This is a partial backport of core#24909
https://github.com/bitcoin/bitcoin/pull/24909/commits/c96524113c48553c4bbad63077a25494eca8159e
Depends on D13044
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13045