xwayland: Fix infinite loop at startup

Mutter recently added headless tests, and when running those tests the
Wayland compositor runs for a very short time.

Xwayland is spawned by the Wayland compositor and upon startup will
query the various Wayland protocol supported by the compositor.

To do so, it will do a roundtrip to the Wayland server waiting for
events it expects.

If the Wayland compositor terminates before Xwayland has got the replies
it expects, it will loop indefinitely calling `wl_display_roundtrip()`
continuously.

To avoid that issue, add a new `xwl_screen_roundtrip()` that checks for
the returned value from `wl_display_roundtrip()` and fails if it is
negative.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>

(cherry picked from commit 785e5906)
3 jobs for display-roundtrip-loop-1.20-branch in 7 minutes and 6 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Docker Image
passed #2875784
debian-testing

00:00:36

 
  Build And Test
passed #2875785
autotools-build-and-test

00:06:29

passed #2875786
meson-build-and-test

00:01:49