code: function IntervalTree(beginPositionCb, endPositionCb) {
      this.beginPositionCb_ = beginPositionCb;
      this.endPositionCb_ = endPositionCb;
  
      this.root_ = undefined;
      this.size_ = 0;
    }
docs: This class implements an interval tree.
  See: http://wikipedia.org/wiki/Interval_tree
  
  Internally the tree is a Red-Black tree. The insertion/colour is done using
  the Left-leaning Red-Black Trees algorithm as described in:
  http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf
  
  @param {function} beginPositionCb Callback to retrieve the begin position.
  @param {function} endPositionCb Callback to retrieve the end position.
  
  @constructor