Convert encrypted-media-needkey test to use W3C testharness.

- Add encrypted-media-utils.js for commonly used utility function for encrypted media tests.
- Also remove unnecessary variables in the encrypted-media-needkey test.

BUG=338485
TEST=This update an existing test to use W3C testharness.

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

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