Add a --run-by-dir option.

This causes the tests to be run one directory at a time before restarting
the browser. The goal is to enable better isolation between testcases.
With multiple processes, each process runs a whole directory worth of tests
before moving on to the next directory. This makes the --proecsses option
more deterministic.