gstplayer: fix race-condition that result in a deadlock when leaving python and gstreamer still running.