code: function RefCounter(onActive, onPassive) {
    this.context = {};
    this.onActive = onActive;
    this.onPassive = onPassive;
    this.currentValue = 0;
    this.isRunning = false;
  }
docs: Ref counter class.
  
  Is used to basically determine active/inactive and allow callbacks that
  hook into each.
  
  For the producer, it is used to begin rapid polling after a produce until
  the delivery report is dispatched.