Reland [Sync] Refactoring polling to be reliable.
This is a reland of https://codereview.chromium.org/
1132013004/
Polling is now an important component of sync health, as it can sometimes be
the only time we'll query for certain datatypes. As such, the following
has changed:
- Polls that fail will be retried (with backoff).
- As such, the logic to force a poll after an auth error isn't needed anymore
- The last successful poll time will be persisted in the sync prefs.
- On startup, schedule the first poll for last_poll_time + poll_interval
(or Now(), whichever is latest).
- Receiving a new poll interval from the server will update the poll timer
- The poll timer is now a one shot timer, and only restarts on success
- Some code cleanup to make the above more straightforward
BUG=482154
Review URL: https://codereview.chromium.org/
1144543004
Cr-Commit-Position: refs/heads/master@{#330024}