Revert "bin: Hold the state lock while removing elements from a bin"

Sebastian Dröge requested to merge slomo/gstreamer:revert-7f70d7a9 into master

This reverts commit 7f70d7a9

See e.g. gst-plugins-base!83 (comment 101232)

It causes deadlocks as we now might take the state lock after the stream lock, while other code (state changes!) are taking the stream lock after the state lock (e.g. when deactivating the pads).

Merge request reports