tlsdate: skip backoff periods on external events

If tlsdate is waiting for E_TLSDATE during backoff, then
action_kickoff_time_sync won't schedule another time check sooner than
the end of the backoff period.  This means that if tlsdate is waiting
out a backoff, plugging a network cable into the system will have no
effect until the end of the backoff.

Make tlsdate allow external events to force the scheduling of a time
sync before the end of a backoff, but only at least wait_between_tries
seconds in the future.  This means that callers will still have to wait
wait_between_tries seconds between checks, but that they no longer need
to wait for the end of the backoff period.

BUG=chrome-os-partner:38718
TEST=manual, saw "pending tlsdate being rescheduled" while in a backoff
     period after a network configuration change, and "called while
     tries are in progress" after change during rescheduled backoff
     period

Change-Id: I37b64a9717bebd329594e8d9c43d60e88f812093
Reviewed-on: https://chromium-review.googlesource.com/263794
Commit-Ready: Garret Kelly <gdk@chromium.org>
Tested-by: Garret Kelly <gdk@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
1 file changed