function addSingletonGetter(ctor) {
    ctor.getInstance = function () {
      return ctor.instance_ || (ctor.instance_ = new ctor());
    };
  }
Adds a {@code getInstance} static method that always return the same
instance object.
@param {!Function} ctor The constructor for the class to add the static
    method to.