Don't call gdk_threads_init()

Accessing gdk from outside the main thread is deprecated.

This also replaces an occurence of gdk_threads_add_idle_full() with an
idle source that is dispatched to the main thread.

https://bugzilla.gnome.org/show_bug.cgi?id=721755