[autotest] Add retrying to autotest frontend RPCs

Add a decorator that will retry a function if it raises an exception,
exponentially backing off until a deadline.  Create classes that wrap
frontend.AFE and frontend.TKO, applying the decorator to their run()
method.

BUG=chromium-os:26419
TEST=unit
TEST=use atest to schedule a suite and restart the afe while it runs
STATUS=Fixed

Change-Id: I8a8c48b4418f55933ab168fc92f19f03ca7e9fc3
Reviewed-on: https://gerrit.chromium.org/gerrit/15960
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
4 files changed