Use a separate context for delivering events
When the java application is using a gtk look&feel, it will be registering stuff in the default main_context, which would thus unexpectedly run within the thread started by java-atk-wrapper! Making java-atk-wrapper use its own glib main_context looks much safer, so that its operations get really isolated in its own thread without interfering with the rest of the application.