rtmp2src: workaround a GLib race when destroying a GMainContext/GSource

https://gitlab.gnome.org/GNOME/glib/-/issues/803

Basically, if destruction of a GSource and its associated GMainContext are
not synchronised, Then the GSource destruction can access freed
GMainContext resources and cause a crash.  This is not super common but
can happen.

Part-of: <gstreamer/gst-plugins-bad!2416>
30 jobs for !2416 with backport-mr-2405-into-1.18-rtmp2src-workaround-glib-maincontext-source-race in 31 minutes and 8 seconds (queued for 11 seconds)
merge request