Define compatibility names for encodings and document.inputEncoding

This fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=27435 and
addresses a comment from
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27436