Speed up "gn path".
"gn path" finds all unique paths. This can be slow because, for example,
//chrome/browser has 478 million unique paths through it's dependency tree
and running path from //chrome/browser to //chrome/renderer took about 6.5
seconds on my big desktop to analyze all of these (to find no results).
This patch keeps track of which targets have been eliminated from consideration
and avoids visiting them again. This improves the above qwuery to 0.78 seconds
while still being able to compute the total number of results.
Review URL: https://codereview.chromium.org/
1143043004
Cr-Commit-Position: refs/heads/master@{#330772}