check the type/language of script elements

I tried to prevent allocations, but the slices wouldn't live long enough to check the static array, without duplicating code. Plus, if the `language` attribute is used, a new String is pretty much required.

Maybe if no type and no language are the most common, it'd be worth using `MaybeOwned`, so that `"text/javascript".to_string()` isn't needed?

fixes #2828 
It’s from http://whatwg.org/html#support-the-scripting-language but yeah, a code comment with the URL would be good.