message: Reference count calls to start/stopListening on ScalarMessaging
  Otherwise component mounting/unmounting can race and you end up with nothing
  listening.
diff: @@ -564,12 +564,27 @@ const onMessage = function(event) {
  });
  };
  +let listenerCount = 0;
  module.exports = {
  startListening: function() {
  + if (listenerCount === 0) {
  window.addEventListener("message", onMessage, false);
  + }
  + listenerCount += 1;
  },
  stopListening: function() {
  + listenerCount -= 1;
  + if (listenerCount === 0) {
  window.removeEventListener("message", onMessage);
  + }
  + if (listenerCount < 0) {
  + // Make an error so we get a stack trace
  + const e = new Error(
  + "ScalarMessaging: mismatched startListening / stopListening detected." +
  + " Negative count"
  + );
  + console.error(e);
  + }
  },
  };
  