relax gui handling, clean glib-threading

* Follow-up to fix of "Attempt to unlock mutex that was not locked" error
* Relaxation of the GUI-initialization: letting the window manager decide
  where to locate the window.
* Resolve superfluent "main()"-function.