Add Encoding API to browser env

Specification: https://encoding.spec.whatwg.org/
Merge pull request #1901 from realityking/patch-1

Add Encoding API to browser env. Specification: https://encoding.spec.whatwg.org/