message: do not hold input write lock while incrementing revision
diff: @@ -74,11 +74,9 @@ where
  }
  fn set_common(&self, db: &DB, key: &Q::Key, value: Q::Value, is_constant: IsConstant) {
  - let mut map = self.map.write();
  + let map = self.map.upgradable_read();
  - // If this value was previously stored, check if this is an
  - // *actual change* before we do anything.
  - if let Some(old_value) = map.get_mut(key) {
  + if let Some(old_value) = map.get(key) {
  if old_value.value == value {
  // If the value did not change, but it is now
  // considered constant, we can just update
  @@ -88,6 +86,8 @@ where
  // dependencies. The next revision, they may wind up
  // with something more precise.
  if is_constant.0 && !old_value.changed_at.is_constant() {
  + let mut map = RwLockUpgradableReadGuard::upgrade(map);
  + let old_value = map.get_mut(key).unwrap();
  old_value.changed_at =
  ChangedAt::Constant(db.salsa_runtime().current_revision());
  }
  @@ -100,8 +100,16 @@ where
  // The value is changing, so even if we are setting this to a
  // constant, we still need a new revision.
  + //
  + // CAREFUL: This will block until the global revision lock can
  + // be acquired. If there are still queries executing, they may
  + // need to read from this input. Therefore, we do not upgrade
  + // our lock (which would prevent them from reading) until
  + // `increment_revision` has finished.
  let next_revision = db.salsa_runtime().increment_revision();
  + let mut map = RwLockUpgradableReadGuard::upgrade(map);
  +
  // Do this *after* we acquire the lock, so that we are not
  // racing with somebody else to modify this same cell.
  // (Otherwise, someone else might write a *newer* revision
  