MediaSource should not use deprecated {,un}setPendingActivity

This change also changes MediaSource to
RefCountedGarbageCollectedWillBeGarbageCollectedFinalized, as
we don't {,de}ref() ourselves anymore.

Bonus: Fix scope of variable |sourceOpened| on the LayoutTest. It needs to be on a global scope to be referenced from both funcs.

BUG=354845

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

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