b=1041466 don't remove one too many streams from the SCC stack r=roc

Also reduce the number of ProcessedMediaStream* static_casts and use a new
variable name |removed| to emphasize what is happening.

--HG--
extra : rebase_source : 50b6c5e2d97a2e4ffbf9db993e1327de8c1d7b36
b=1022945 make some SourceMediaStream methods,classes protected r=roc

including ResampleAudioToGraphSampleRate() which assumes a graph.

--HG--
extra : rebase_source : d6884dc8d36e4985e14558cc78d69e99ffeba921
b=1022945 remove SetStreamOrderDirty call from ProcessedMediaStream::DestroyImpl r=roc

The stream order is only important if there are connections, in which case
MediaInputPort::Disconnect() calls SetStreamOrderDirty().

MediaStreamGraphImpl::RemoveStream() also calls SetStreamOrderDirty(), which
ensures that mFirstCycleBreaker is updated when necessary.

--HG--
extra : rebase_source : b437f0d078a481725579456d91acc32353e1221a
b=1022945 null MediaStream::mGraph before removing stream from graph r=roc

and use mGraph to test whether SourceMediaStreams are destroyed.

--HG--
extra : rebase_source : 03df9e7ab14ecd627dfeb333b79713a7b619f215
b=1022945 null MediaInputPort::mGraph when removing port from graph r=roc

This shouldn't be necessary, if clients do the right things, but provides some
safety, in case they don't.

--HG--
extra : rebase_source : e64d663c27f03eff35f538c205cd66d42420d9e4
b=1022945 only AppendToTrack before SourceMediaStreams are destroyed r=roc

--HG--
extra : rebase_source : 016877261fb7a10b6d99abd17a8ca26b222d38c4