Unit test for 'Detaching from a media element' algorithm of MediaSource Object

Added a unit test to check 'Detaching from a media element' algorithm of MediaSource Object.
Please review the code.

Hitoshi Uchida <uchida@w3.org>