message: Fix race condition for SetBannedSetDirty() calls
  Another thread can `SetBannedSetDirty(true)` while `CBanDB::Write()`
  call being executed. The following `SetBannedSetDirty(false)`
  effectively makes `m_is_dirty` flag value inconsistent with the actual
  `m_banned` state. Such behavior can result in data loss, e.g., during
  shutdown.
diff: @@ -49,11 +49,12 @@ void BanMan::DumpBanlist()
  SweepBanned();
  if (!BannedSetIsDirty()) return;
  banmap = m_banned;
  + SetBannedSetDirty(false);
  }
  int64_t n_start = GetTimeMillis();
  - if (m_ban_db.Write(banmap)) {
  - SetBannedSetDirty(false);
  + if (!m_ban_db.Write(banmap)) {
  + SetBannedSetDirty(true);
  }
  LogPrint(BCLog::NET, "Flushed %d banned node addresses/subnets to disk %dms\n", banmap.size(),
  