x11: Add public API to handle X11 events
This API will be used by GNOME Shell to handle X11 events in the relevant places, as a substitute to gdk_window_add_filter().
It is ATM still a bit ironic, since the Mutter X11 event handler is itself a GdkFilterFunc, but it may move away from that eventually.