[Background Sync] Separate constructs for sync types.

Currently we have points in code where we also schedule a task to wake up Chrome
to process periodic sync events when only one-shot sync registrations are
present.

This doesn't cause any unexpected events to be fired, and we'll cancel the task
soon thereafter but it does cause Chrome to be woken up more often than
expected.

This CL makes two changes to address this:
1. Introduce separate counters for num_firing_registrations, so we don't
schedule two failsafe Chrome wake up tasks upon firing one type of sync
event. Ensure we only schedule a wakeup for the right type of sync.
2. Introduce separate global wakeup deltas for the two types of sync.

Bug: 992100
Change-Id: Id7fadd3dff6a6977cddae2dae949304dbd3e377b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1744415
Commit-Queue: Mugdha Lakhani <nator@chromium.org>
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685963}
7 files changed