Use QCoreApplication::exit() rather than exit() when Wayland connection ...

...breaks

This gives the program a better chance to exit cleanly. Plain exit() is causing
randomish crashes wrt threading and other teardown activities.

It's debatable whether this should actually be exit(0)...