Made xcb-connection thread and interrupt safe
Mechanism to post functions to the event loop from another thread
More robust event dispatcher that routes events based on guard functions