Fixed input_thread shutdown issue if not initiated by user.
Now processing input messages in async thread.
Abortion check now just tests for quit in the queue.
Merge pull request #1868 from akallabeth/x11_shutdown_fix

X11 aync input shutdown fix