stop mainLoop without quit whole application
I try to use nigui to occasionally show a simple gui in an otherwise cli application.
The problem is that `app.quit()` just calls `system.quit()` so the whole program is shut down.

It would be nice to have a way to just stop the mainLoop without quitting the whole application.