player: Stop mainloop and thread in dispose and handle refcounting of them in init/dispose
player: Stop mainloop and thread in dispose and handle refcounting of them in init/dispose

Doing it in the thread itself is racy and leads to critical
warnings every now and then.

jabiers/gst-player,amorenoc/gst-player,sdroege/gst-player,codomania/gst-player,guiseco/gst-player,amorenoc/gst-player,jabiers/gst-player,justinjoy/gst-player,guiseco/gst-player,JimmyOhn/gst-player,guiseco/gst-player,sdroege/gst-player,JimmyOhn/gst-player,amorenoc/gst-player,shakin/gst-player,shakin/gst-player,justinjoy/gst-player,codomania/gst-player,justinjoy/gst-player,JimmyOhn/gst-player,JimmyOhn/gst-player,JimmyOhn/gst-player,amorenoc/gst-player,sdroege/gst-player,codomania/gst-player,jabiers/gst-player,sdroege/gst-player,amorenoc/gst-player,codomania/gst-player,shakin/gst-player,sdroege/gst-player,codomania/gst-player