Fix issue with timer not stopping after gtk_main_quit is called

Not an issue when only one instance of GTK's main loop is running,
but when nested inside g-c-c the timer continues to fire until
the timeout would have normally been reached. This creates a lot
of needless log pollution. We now check if the main window exists
in addition to running the timer; there's no sense in continuing
to run the timer without the program's window ;)
latest commit 1ef0cf7e15
Jason Gerecke authored