gtk: call Gtk.main_iteration() only if there are events to process

Otherwise, main_iteration() is a blocking call, so if there's no events
to process, I guess the code will block there.
Correctly use GtkApplication 'activate' signal, fix 'withdrawn' mode

At startup, if the application was in 'withdrawn' mode, that is, wasn't
supposed to show up until the user clicks on the tray icon (if present),
the application used to block completely, due to a lack of Gdk locks in
the "activate" signal of the GtkApplication's handler: this signal comes
from the GApplication object, which isn't aware of the Gdk lock and
thus, doesn't hold it while running the handler, contrary to what's
happening during "normal" Gtk events.

Or that's what I understood.

Fix #57
gkt: fix withdrawn mode due to incorrect usage of threads

Merge branch 'fix/57-withdrawn'

Conflicts:
	CHANGELOG