expect sourceended after MediaSource.endOfStream() instead of sourceclose

"ended" readyState is expected when "The source is still attached to a media
element, but endOfStream() has been called."  "closed" is expected only when
"the source is not currently attached to a media element."

http://www.w3.org/TR/2014/CR-media-source-20140717/#mediasource-events
http://www.w3.org/TR/2014/CR-media-source-20140717/#idl-def-ReadyState

As quoted in the test, abort() throws INVALID_STATE_ERR when readyState is any
value that is not "open", including "ended".

http://www.w3.org/TR/2014/CR-media-source-20140717/#widl-SourceBuffer-abort-void
wrap assert_throws() call in appropriate subtest step
wrap assert_unreached() calls in appropriate subtest step

Requested by Philip Jägenstedt <philipj@opera.com>
assert that readyState is "ended" before expecting "sourceended" event

Inspired by suggestion from Philip Jägenstedt <philipj@opera.com>.