Implement 'window.isSecureContext'.

The "Secure Contexts" spec defines a feature-detection mechanism for
secure contexts on the Window and WorkerGlobalScope objects[1]. This
patch implements the former. The latter will be in a subsequent patch,
as the logic to deal with Shared Workers is a bit more complicated.

It also renames the internal check from 'isPrivilegedContext' to
'isSecureContext', in line with the specification. That is a purely
mechanical change, using the following commands:

> git grep -n -l -e "isPrivilegedContext" | xargs -L1 sed -i '' -e 's/isPrivilegedContext/isSecureContext/g'
> git grep -n -l -e "PrivilegeContextCheck" | xargs -L1 sed -i '' -e 's/PrivilegeContextCheck/SecureContextCheck/g'
> git grep -n -l -e "StandardPrivilegeCheck" | xargs -L1 sed -i '' -e 's/StandardPrivilegeCheck/StandardSecureContextCheck/g'
> git grep -n -l -e "WebCryptoPrivilegeCheck" | xargs -L1 sed -i '' -e 's/WebCryptoPrivilegeCheck/WebCryptoSecureContextCheck/g'

[1]: https://w3c.github.io/webappsec/specs/powerfulfeatures/#monkey-patching-global-object

BUG=534788

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

Cr-Commit-Position: refs/heads/master@{#351290}
42 files changed