xwayland: Do flush GPU work in xwl_present_flush

The Present code sends the idle notification event to the client after
xwl_present_flush returns. If we don't flush our GPU work here, the
client may race to draw another frame to the same buffer, so we may end
up copying (parts of) that new frame instead of the one we meant to.

Fixes xorg/xserver#835

Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(Cherry picked from commit 2a2234ad)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
3 jobs for server-1.20-branch in 7 minutes and 21 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Docker Image
passed #1193168
debian-testing

00:00:28

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

00:06:53

passed #1193170
meson-build-and-test

00:02:05