gl/egl: destroy eglSurface before destroying wayland surface

It might be a probleme due to the order in which EGLSurfaces and wayland
surfaces are destroyed. When we use a foreign surface, it deletes the
wayland surface that was already created, and EGLSurface is deleted
afterward. This ensures that the EGLSurface will be removed before the
wayland surface is gone.
21 jobs for gl in 76 minutes and 52 seconds (queued for 11 minutes and 1 second)
latest
Status Job ID Name Coverage
  Preparation
passed #409386
gst indent

00:00:58

passed #409385
manifest

00:00:38

 
  Build
passed #409392
build cerbero android universal

00:20:46

passed #409393
build cerbero cross win32

00:08:30

passed #409394
build cerbero cross win64

00:10:56

passed #409391
build cerbero fedora x86_64

00:09:47

manual #409396
gst-ios-12.2 allowed to fail manual
build cerbero ios universal
passed #409395
gst-macos-10.14
build cerbero macos x86_64

00:06:51

passed #409387
build fedora x86_64

00:06:37

passed #409388
build nodebug fedora x86_64

00:08:51

passed #409389
build static fedora x86_64

00:18:52

passed #409390
build static nodebug fedora x86_64

00:11:51

 
  Test
passed #409397
check fedora

00:07:10

passed #409398
integration testsuites fedora

00:12:12

passed #409402
valgrind bad

00:07:56

passed #409399
valgrind base

00:08:31

passed #409403
valgrind ges

00:10:38

passed #409400
valgrind good

00:11:15

passed #409401
valgrind ugly

00:02:40

 
  Integrate
passed #409404
android universal examples

00:09:51

passed #409405
documentation

00:03:59