Rename Timeout -> FatalTimeout and SubCommandTimeout -> Timeout.

The current 'Timeout' class exits the program and repeatedly raises
SystemExit exceptions until the whole program has exited. Thus it is not a
good choice for typical usage. Rename it to FatalTimeout so that it is
clear what it does.

The current 'SubCommandTimeout' class is a generally useful timeout
class -- it isn't limited to just wrapping RunCommand invocations. As
such, rename it to a generic name: Timeout.

The old Timeout class was only used in two places: In TimeoutDecorator
and in cbuildbot.py

FatalTimeout should not be used in TimeoutDecorator, since that class is
intended to be generic and is used in programs which are not supposed to
exit -- we don't want tests, for example, to repeatedly be receiving
SystemExit exceptions after the test exits.

FatalTimeout is appropriate for cbuildbot, since we do want to timeout
the whole program when cbuildbot exits. Thus we continue using it there.

BUG=chromium:323675
CQ-DEPEND=CL:178733
TEST=All unit tests.
TEST=paladin and release trybots

Change-Id: I9f601213001782a7c66cb6593bc14c6c3c2bd302
Reviewed-on: https://chromium-review.googlesource.com/178207
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
7 files changed