message: Clean up dead notifiers before unregistering the Realm
  `m_config` is immutable only while the coordinator has at least one registered
  Realm. That's a precondition of `unregister_realm()`, but once we remove the
  Realm it may no longer be the case.
diff: @@ -325,12 +325,6 @@ RealmCoordinator::~RealmCoordinator()
  void RealmCoordinator::unregister_realm(Realm* realm)
  {
  - {
  - std::lock_guard<std::mutex> lock(m_realm_mutex);
  - auto new_end = remove_if(begin(m_weak_realm_notifiers), end(m_weak_realm_notifiers),
  - [=](auto& notifier) { return notifier.expired() || notifier.is_for_realm(realm); });
  - m_weak_realm_notifiers.erase(new_end, end(m_weak_realm_notifiers));
  - }
  // Normally results notifiers are cleaned up by the background worker thread
  // but if that's disabled we need to ensure that any notifiers from this
  // Realm get cleaned up
  @@ -338,6 +332,12 @@ void RealmCoordinator::unregister_realm(Realm* realm)
  std::unique_lock<std::mutex> lock(m_notifier_mutex);
  clean_up_dead_notifiers();
  }
  + {
  + std::lock_guard<std::mutex> lock(m_realm_mutex);
  + auto new_end = remove_if(begin(m_weak_realm_notifiers), end(m_weak_realm_notifiers),
  + [=](auto& notifier) { return notifier.expired() || notifier.is_for_realm(realm); });
  + m_weak_realm_notifiers.erase(new_end, end(m_weak_realm_notifiers));
  + }
  }
  void RealmCoordinator::clear_cache()
  