Check for permission when registering Background Sync

This is the third in a series of patches to add a content setting to
Background Sync. For a detailed plan, refer to https://goo.gl/9U8fKh

This patch makes the BackgroundSyncPermissionManager check for
permission when registering a sync, which effectively means the sync
promise will be rejected if the user blocks the feature.

BUG=564052
TEST=BackgroundSyncManagerTest.RegisterPermissionDenied, layout http/tests/background_sync/permission_denied.html

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

Cr-Commit-Position: refs/heads/master@{#384248}
29 files changed