Fixes the primary issue with waking up the main run loop.  There are still issues with the mutex.
A lot of code cleanup in the X11 input helper.
Added autoconf option for evdev that is enabled by default on linux.
Merge origin/master