x11: fix make check segfault
make the state change test pass
window: add send_message_async vmethod

- provide a default synchronous send_message
- make context creation threadsafe again