add ability to group results by dirname in print-layout-test-times.
add ability to group results by dirname in print-layout-test-times.

this allows us to summarize the times by directories. -f groups
by the number of directories from the root of the tree, and -b groups
from the back. Given "fast/forms/week/week-input-type.html', -f 1
truncates to 'fast', -f 2 and -b 2 truncates to 'fast/forms', and -b 1
truncates to fast/forms/week . -f 0 truncates to '', which can be used
to produce a single total time for the run.

R=ojan@chromium.org
BUG=238381

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@151871 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