Increase device registration timeout interval

Since the slow network could take long time to come up, increase wifi
connection timeout to 3 minutes. Also we start device registration
process at the same time as the network setup, so a few HTTP requests
are bound to fail before the network is connected, so redesigned the
logic of retrying device registration requests.

We start with exponential backoff that is capped at 5 seconds. We don't
want to wait longer between attempts during the network setup. We keep
trying to make a successfull HTTP request to register the device for
up to 5 minutes before aborting.

BUG: 23748366
Change-Id: I96d15c92067d3ad2561360a9d6ef2ae47168fcd7
3 files changed
tree: c3c612ed8bb31ab7f085e02b1d1f4292e5b43534
  1. libweave/