[BackgroundSync] Add browser side support for SyncRegistration.done

This CL adds support for the "done" promise of background sync registrations. See
http://slightlyoff.github.io/BackgroundSync/spec/index.html for more detail.

Done resolves with true if the sync event fired successfully and false
if it failed or is unregistered.

Changes:

1. Add and test BackgroundSyncManager::NotifyWhenDone.
2. Plumb NotifyWhenDone to the child process.
3. Test with BrowserTests that done can be called before or after a registration completes.

Depends on:
https://codereview.chromium.org/1353613002/
https://codereview.chromium.org/1348603003/

BUG=502214

Review URL: https://codereview.chromium.org/1344843003

Cr-Commit-Position: refs/heads/master@{#349660}
18 files changed