Tune performance of palette file searches

With these changes I can use the palette file search on the chromium source code. I also fixed what I think is a bug in the debouncing.
I'm thinking of replacing the tests for having matched previous stages of the search with `results.indexOf(path) == -1` because I think it's more clear what it's doing, but I wanted to check whether that would be problematic on the size codebase you're searching. Since we mostly stop at 10 results, would that still scale, or should I keep the regex test?