Don't quit application when welcome dialog is active (#1087)

Usually the application quits when the last document window is
closed; when a document is opened from the splash screen but fails
to open somehow, then the application should not quit.

Re-fix this by using GApplication when Debian's GLib has it.

Fixes Mantis#1087