Cherry-pick: Fix device registration expiration with system clock adjusted

When system clock is being adjusted on device during registration,
the registration process could prematurely be considered expired
when the clock rolls forward. Change the logic to use retry counters
instead of absolute expiration time to mitigate this problem.

BUG: 26266459
Change-Id: I31de553bedabd7b501ed1d222932d4f379018dd2
Reviewed-on: https://weave-review.googlesource.com/1893
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
(cherry picked from commit b3de3512f0276c7af73b3f2de0637c423d459f2e)
1 file changed