Add checks to avoid errors when ctrl-c in wizard.

Check that systray exists, not the case during first run.
Cleanup reactor stop code.

Closes #5559.