xwayland: Remove pending stream reference when freeing

The EGLStream backend keeps a queue of pending streams for each Xwayland
window.

However, when this pending queue is freed, the corresponding private
data may not be cleared (typically if the pixmap for this window has
changed before the compositor finished attaching the consumer for the
window's pixmap's original eglstream), leading to a use-after-free and a
crash when trying to use that data as the window pixmap.

Make sure to clear the private data when the pending stream is freed.

Closes: xorg/xserver#1055
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Tested-by: Karol Szuster <karolsz9898@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
4 jobs for eglstream-pending-use-after-free in 3 minutes and 58 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Docker Image
passed #4639020
debian-testing

00:00:28

 
  Build And Test
passed #4639021
autotools

00:03:30

passed #4639022
meson

00:01:34

passed #4639023
meson-noglamor

00:01:20