events: Sync pending pointer events without a window

Mutter issues a synchronous grab on the pointer for unfocused client
windows to be able to catch the button events first and raise/focus
client windows accordingly.

When there is a synchronous grab in effect, all events are queued until
the grabbing client releases the event queue as it processes the events.

Mutter does release the events in its event handler function but does so
only if it is able to find the window matching the event. If the window
is a shell widget, that matching may fail and therefore Mutter will not
release the events, hence causing a freeze in pointer events delivery.

To avoid the issue, make sure we sync the pointer events in case we
can't find a matching window.

!821
4 jobs for master in 10 minutes and 2 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #453044
build-mutter

00:06:36

passed #453045
build-without-native-backend

00:03:33

 
  Test
passed #453047
can-build-gnome-shell

00:02:07

passed #453046
test-mutter

00:03:26