Instead of letting all the elements that were added into the bin,
add them only when strictly needed and removed them when we stop using
them.
With previous refactoring we are keeping them in our own hashmap in
amy case so we can keep reusing the same elements as before.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/899>
We used to conside elements that were subclassses of another
element type as being the same (for example with videoconvertscale,
bother videoconvert and videoscale are subclasses of videoconvertscale
and that code was lost)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/899>