message: Add an eventCache to MatrixHandler for getting reply sources
diff: @@ -19,6 +19,7 @@ const MSG_PMS_DISABLED_FEDERATION = "[Bridge] Sorry, PMs are disabled on " +
  const KICK_RETRY_DELAY_MS = 15000;
  const KICK_DELAY_JITTER = 30000;
  +const EVENT_CACHE_SIZE = 4096;
  function MatrixHandler(ircBridge) {
  this.ircBridge = ircBridge;
  @@ -30,6 +31,7 @@ function MatrixHandler(ircBridge) {
  };
  this._memberTracker = null;
  + this._eventCache = new Map(); //eventId => {body, sender}
  }
  // ===== Matrix Invite Handling =====
  @@ -1261,6 +1263,16 @@ MatrixHandler.prototype._sendIrcAction = Promise.coroutine(
  return;
  }
  + /**
  + * Cache events in here so we can refer to them for replies.
  + * We deliberately avoid fetching events from the homeserver due to speed concerns.
  + */
  + this._eventCache.set(event.event_id, { body: event.content.body, sender: event.sender });
  + if (this._eventCache.size > EVENT_CACHE_SIZE) {
  + const delKey = this._eventCache.entries().next().value[0];
  + this._eventCache.delete(delKey);
  + }
  +
  let text = event.content.body;
  const REPLY_SOURCE_MAX_LENGTH = 32;
  const REPLY_NAME_MAX_LENGTH = 12;
  