function indexAndFind(invokeFind) {
            runs(function () {
                var result = new $.Deferred();
                ProjectManager.getAllFiles().done(function (files) {
                    invokeFind(files)
                        .done(function (functionsResult) { functions = functionsResult; })
                        .then(result.resolve, result.reject);
                });

                waitsForDone(result, "Index and invoke JSUtils.findMatchingFunctions()");
            });
        }
Builds a fileInfos index of the project, as required to call findMatchingFunctions(). Calls the
specified 'invoker' function with fileInfos, and populates the 'functions' var once it's done.
Does not need to be wrapped in a runs() block.
@param {function(Array.<File>):$.Promise} invokeFind