code: function addAggregatingTimer(key, callback, period) {
          if( !period) {
              period = 100; // 0.1 second
          }
          var counter = 0;
          if( aggregatingTimers[key]) {
              clearTimeout(aggregatingTimers[key].timer);
              counter = aggregatingTimers[key].counter;
          }
          if( counter > 20) {
              delete aggregatingTimers[key];
              callback();
          }
          else {
              aggregatingTimers[key] = {counter: counter +1};
              aggregatingTimers[key].timer = setTimeout(function () {
                  delete aggregatingTimers[key];
                  callback();
              }, period);
          }
      }
docs: This function sets a timeout for a function to be called with the feature that if another
  invocation comes along within a particular interval (with the same key), the second invocation
  replaces the first. To prevent a continuous stream of events from preventing a callback from ever
  firing, we'll collapse no more than 20 events.
  @param {String} key A key used to identify callbacks that should be aggregated.
  @param {Function} callback The callback to invoke.
  @param {Number} period The aggregating period in milliseconds.
  @private