Speed up the webkitpy.layout_tests.port.tests() call in some cases.
Speed up the webkitpy.layout_tests.port.tests() call in some cases.

That call takes an optional list of paths to restrict the list of tests
to. In some cases, the paths may refer to directories or tests in virtual
test suites.

Previously, we would load all of the virtual test suites and compute all
of the underlying actual tests for each suite, even if the list of paths
made no reference to the suite. This would result in us doing a lot of
unnecessary file system traversals to do path discovery, which is pretty
fast most of the time. It turns out we only notice this during
'webkit-patch optimize-baselines', where we do a lot of test discovery over
and over again.

Fixing the tests() implementation to only discover the tests for the paths
we care about makes optimize-baselines 3x faster on mac and almost 20x faster on linux.

Existing test cases are reused to guarantee coverage.

R=ojan@chromium.org
BUG=410626

Review URL: https://codereview.chromium.org/539793002

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@181446 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs