Make the game quit for real when the main thread ends.

Through bugs or an unclean shutdown it can happen that there are still
running threads when the main thread comes to an end. If we don't
explictly shutdown the VM, it may happen that the VM keeps
running invisible in the background consuming resources.

To prevent this, this thread forces the VM to quit when the
main thread coems to an end.

Note: The crash reporter call blocks till the crash reporter is done.
So the VM won't be force quitted before the user quits the crash reporter.

This patch should fix all scenarios of #1266 as the VM quits now even if there was no clean shutdown.