Don't show multiple exit confirmation dialogues. Pause emulation while waiting for confirmation to exit. Fixes issue 5822.