[Background Sync] Add connectivity check before dispatching sync event

There are a few disk reads that take place between regaining
connectivity and dispatching the event. This adds another check right
before dispatching the event to increase the reliability of the sync events

Also collect how often this happens via UMA (until M74).

Change-Id: I3aaf408bbb45b920a02236487df5246e8499500e
Reviewed-on: https://chromium-review.googlesource.com/c/1361860
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614705}
6 files changed