Gate unprefixed MediaSource endOfStream() and setDuration() on asynch appends

Matches the current MSE spec's requirement that MediaSource.endOfStream()
and MediaSource.duration= throw exception if any of the source
buffers are pending completion of asynchronous append.
Also adds enforcement (including prefixed implementation) that the
'error' argument of endOfStream() either be within the current spec's
EndOfStreamError enum or not be set. This invalidates null and
empty string values in anticipation that the spec is updated similarly.
Adds relevant layout tests.

R=acolwell@chromium.org,scherkus@chromium.org
BUG=337900
TEST=New tests fail without patch, all MSE layout tests pass with patch on local linux

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

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