Make application quit on main window close

Specialy with plugin created windows it can become confusing if OBS is still running even though its mainwindow is gone.
This prevents that from happening, closing the mainwindow exits the application.