Avoid QXcbEventReader crash during library shutdown (bnc#879295).

It is not a race, because the destructor is only called after the thread is destroyed.
The code duplication here mimics the duplication of `YQUI::initUI` for the cases threads/no-threads.