BlockManager::LoadBlockIndex is only called by BlockManager::LoadBlockIndexDB. Thus, it can be made private.
m_best_invalid is no longer accessed by BlockManager::LoadBlockIndex. Thus, the unused friend can be removed.
This is a backport of core#24917