[Merge to M46] Only access extension service worker state on destruction of a service worker if it's an extension service worker.
[Merge to M46]
Only access extension service worker state on destruction of a service worker if it's an extension service worker.

BUG=501569
R=rdevlin.cronin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#344927}
(cherry picked from commit f797650ec26effca41e1ee09651160a68184b90c)

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

Cr-Commit-Position: 3d535b37d34f51311a06d1efc2fd401e6dd4c4e6@{#3}
Cr-Branched-From: 2b106cf29c0cb1cc0baadd731b4d998248b17b76@{#344925}

Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk