X11 aync input shutdown fix

Fixed the thread shutdown for async input. Now checking input queue for MSG_QUIT to shut down thread when initiated by some connection error.