Convert Encoding API tests to W3C testharness.js

These tests should be upstreamed to W3C web-platform-tests.

BUG=368310,368904

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

git-svn-id: svn://svn.chromium.org/blink/trunk@173047 bbb929c8-8fbe-4397-9dbb-9b2b20218538