message: Fix error in Transaction::promote_to_write
diff: @@ -826,16 +826,15 @@ inline void Transaction::promote_to_write(O* observer)
  if (m_transact_stage != DB::transact_Reading)
  throw LogicError(LogicError::wrong_transact_state);
  - auto hist = db->get_history_read(); // Throws
  - if (!hist)
  - throw LogicError(LogicError::no_history);
  -
  db->do_begin_write(); // Throws
  try {
  + Replication* repl = db->get_replication();
  + if (!repl)
  + throw LogicError(LogicError::no_history);
  +
  VersionID version = VersionID(); // Latest
  - bool history_updated = internal_advance_read(observer, version, *hist, true); // Throws
  + bool history_updated = internal_advance_read(observer, version, *repl->get_history_write(), true); // Throws
  - Replication* repl = db->get_replication();
  REALM_ASSERT(repl); // Presence of `repl` follows from the presence of `hist`
  DB::version_type current_version = m_read_lock.m_version;
  repl->initiate_transact(*this, current_version, history_updated); // Throws
  