message: validation: Pass in chainstate to ::NotifyHeaderTip
  [META] This commit should be followed up by removing the comments and
  assertions meant only to show that the change is correct.
diff: @@ -2601,7 +2601,7 @@ static SynchronizationState GetSynchronizationState(bool init)
  return SynchronizationState::INIT_DOWNLOAD;
  }
  -static bool NotifyHeaderTip() LOCKS_EXCLUDED(cs_main) {
  +static bool NotifyHeaderTip(CChainState& chainstate) LOCKS_EXCLUDED(cs_main) {
  bool fNotify = false;
  bool fInitialBlockDownload = false;
  static CBlockIndex* pindexHeaderOld = nullptr;
  @@ -2612,7 +2612,8 @@ static bool NotifyHeaderTip() LOCKS_EXCLUDED(cs_main) {
  if (pindexHeader != pindexHeaderOld) {
  fNotify = true;
  - fInitialBlockDownload = ::ChainstateActive().IsInitialBlockDownload();
  + assert(std::addressof(::ChainstateActive()) == std::addressof(chainstate));
  + fInitialBlockDownload = chainstate.IsInitialBlockDownload();
  pindexHeaderOld = pindexHeader;
  }
  }
  @@ -3536,7 +3537,7 @@ bool ChainstateManager::ProcessNewBlockHeaders(int32_t& nPoSTemperature, const u
  }
  }
  }
  - if (NotifyHeaderTip()) {
  + if (NotifyHeaderTip(::ChainstateActive())) {
  if (::ChainstateActive().IsInitialBlockDownload() && ppindex && *ppindex) {
  LogPrintf("Synchronizing blockheaders, height: %d (~%.2f%%)\n", (*ppindex)->nHeight, 100.0/((*ppindex)->nHeight+(GetAdjustedTime() - (*ppindex)->GetBlockTime()) / Params().GetConsensus().nPowTargetSpacing) * (*ppindex)->nHeight);
  }
  @@ -3695,7 +3696,7 @@ bool ChainstateManager::ProcessNewBlock(const CChainParams& chainparams, const s
  }
  }
  - NotifyHeaderTip();
  + NotifyHeaderTip(::ChainstateActive());
  BlockValidationState state; // Only used to report errors, not invalidity - ignore it
  if (!::ChainstateActive().ActivateBestChain(state, chainparams, pblock))
  @@ -4421,7 +4422,7 @@ void LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi
  }
  }
  - NotifyHeaderTip();
  + NotifyHeaderTip(::ChainstateActive());
  // Recursively process earlier encountered successors of this block
  std::deque<uint256> queue;
  @@ -4447,7 +4448,7 @@ void LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi
  }
  range.first++;
  mapBlocksUnknownParent.erase(it);
  - NotifyHeaderTip();
  + NotifyHeaderTip(::ChainstateActive());
  }
  }
  } catch (const std::exception& e) {
  