Remove unused Core::input_thread, move SDLEvents to a thread

Core::input_thread had no effect at all. Remove it.
Move SDLEvents (SDL's event loop) to a thread instead.
Improve SDLEvents/Joystick

Joystick instances now only handle events for the device they are
attached to.

SDLEvents class now stops event propagation when one of the event
handler returns true.