Fix the exit machinery. The GuiInterface is an explicitly instantiated singleton in the style of QCoreApplication. This forces a well-defined order of initialization and destruction. This is a prerequisite for coexistence with Qt code, but doesn't itself depend on Qt at all.