Introduce ScriptLoader::script_type_

This CL introduces the logic for determining the script type to ScriptLoader.
script_type_ will be used by subsequent CLs.

This CL also makes Step 6 of ScriptLoader::PrepareScript()
(IsValidScriptTypeAndLanguage()) to correspond directly to the spec.

This CL doesn't change the behavior.

BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2821803002
Cr-Commit-Position: refs/heads/master@{#465443}
4 files changed