constructor(tree, filterFunction) {
    super();
    this.filterFunction_ = filterFunction;
    this.found_ = false;
    this.visitAny(tree);
  }
FindIdentifiers class traverses a tree searching for identifier
expressions till it finds one that passes the filter function. The logic of
the filter function is provided by the caller of the class.

This is used by FindBlockBindingInLoop to check if a function in a loop uses
any block variables that are declared in the surrounding loop.

This class wants to both be a ScopeVisitor and a FindVisitor,
so FindVisitor's methods were copied and slightly modified here.