Kill window immediately on controller destruction

When qApp->quit() is called, things still unprocessed in the event loop are not guarenteed to be handled. This causes race conditions on certain platforms, and connections may not be closed correctly because those happen in destructors.

By calling delete explicitly instead of calling deleterLater() (thus go through the event loop), we can make sure that destructors in the object hierarchy are all executed.

Fix #68