make restart functionality MUCH simpler

the code was intermingled everywhere. Now it works as it should, simply
by callinp app.restart(). Added app.is_git_controlled() instead of setting
an attribute to the global QApplication object.