X11: process events in order

Using (XCheckMaskEvent(...) || XCheckTypedEvent(..., ClientMessage, ...))
will process all other events before handling ClientMessages, possibly
messing up the order the events Arrived.

Use XCheckIfEvent with an always-true predicate to remove events from
the event queue without blocking while holding the X11 global mutex.