gl/dispmanx: fix removing foreign window handle

gst_gl_window_dispmanx_egl_set_window_handle() removes native window handle
(dispmanx element), regardless it was foreign window handle
(set via gst_video_overlay_set_window_handle()) or not.

This problem prevents glimagesink reusable.
(PAUSED -> READY -> PAUSED does not work)

This patch corrects it comparing the native window handle with foreign window
handle. This behavior is same as gst_gl_window_dispmanx_egl_close().

https://bugzilla.gnome.org/show_bug.cgi?id=785199
diff --git a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c
index 7b10b4d..46bd509 100644
--- a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c
+++ b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c
@@ -192,7 +192,7 @@
   GST_DEBUG_OBJECT (window, "set window handle with size %dx%d",
       foreign_window->width, foreign_window->height);
 
-  if (window_egl->native.element) {
+  if (window_egl->native.element && window_egl->native.element != window_egl->foreign.element) {
     dispman_update = vc_dispmanx_update_start (0);
     vc_dispmanx_element_remove (dispman_update, window_egl->native.element);
     vc_dispmanx_update_submit_sync (dispman_update);