bug 1081766 clear audio/video track/reader only once r=kinetik

Clearing tracks after Shutdown of TrackBuffers means they are cleared
after any more can be added.

--HG--
extra : rebase_source : afd6c4336f440f59da84465908e25b88619484de
extra : histedit_source : 9e2b5856642e9c2084fc14e6bf79195a67e7bff5
bug 1081766 don't clear mTrackBuffers in Shutdown so that BreakCycles can recurse r=kinetik

--HG--
extra : rebase_source : 2b5154fd7e5844b503eca37836aca116f4018fb3
extra : histedit_source : 31d7305391d71def3ed360582a3c4caacd736baa
bug 1081766 clear mInitializedDecoders and mParentDecoder only once r=kinetik

--HG--
extra : rebase_source : 2652f33a99818ec842233fda29f155fe193b195f
extra : histedit_source : 5711775674d0d68e3e1e7cab48272cb1fa1694ec
bug 1081766 don't clear mDecoders in TrackBuffer::Shutdown so that BreakCycles can recurse r=kinetik

--HG--
extra : rebase_source : a6f20e639b6e71a26fe65ad9cedb8d852f8b31e4
extra : histedit_source : 08a606b2583a442b84d153ad776cc7a87229266b
bug 1081766 clear mDecoders in BreakCycles to save dispatching another task r=kinetik

--HG--
extra : rebase_source : 24cd218c1fe0bc4c67d6f9d94d98dfec1e3b497b
extra : histedit_source : 43fd6a0c7d2ba766f8f9f4fdb8fcd5adc6e5ed02
bug 1082206 detach TrackBuffer when unlinking SourceBuffer r=kinetik

When HTMLMediaElement initiates MediaSourceDecoder Shutdown() in cycle
collection, it may no longer have access to the SourceBuffers to notify
through Detach().

The DiscardDecoder() call in TrackBuffer::Shutdown() is too late as this runs
after MediaDecoderStateMachine::FlushDecoding(), which waits for decode tasks
waiting on the MediaSourceResource.

--HG--
extra : rebase_source : 67e276044a251556eda2186d044c7f6b1f4363cd
extra : histedit_source : 4d921a5d2f4c0bce9ed67a3cb769c0d407662d6c
bug 1080958 enable tests that previously caused timeout in sandbox_002.htm

--HG--
extra : rebase_source : db141429fd812ed7051023c4c6b93320f8605615
extra : histedit_source : 87d56eac159808c82b05305dbccef62582e784a2