Add zdl_window_native_handle
xlib: adjust handling of ConfigureNotify events
xlib: keep track of modifiers and generate events on focus

This is required to prevent stuck keys if modifiers are pressed while
unfocusing.  This should theoretically be ensured by the responsible
window manager, but many do not handle this.
xlib: ensure motion ID and flags are set properly
Update Makefile to link test app as a library
Update test