Fixed event registration on MediaStreamSource object so that the event handlers are removed in the "closed" event.