[linux] Upgrade SDL1.2 to SDL2 for hotpluggable joysticks

This is a set of patches that cleans up some of the CJoystick mess and makes it use SDL2 which brings hotplug support without udev hacks.

This PR continues @topfs2' work (in https://github.com/topfs2/xbmc/tree/sdl2) of moving to SDL2 for linux joystick handling. It is also a followup of https://github.com/xbmc/xbmc/pull/5357 which cleans up some of the joystick mess which made the transition to SDL2 less painful. I've split the work into 2 PR's because fiddling with libraries on a toolchain as complex as xbmc's is too scary for me. The changes in https://github.com/xbmc/xbmc/pull/5357 should be relatively safe to pull in, while these may need some more careful reviewing. 
I'd also like to request a jenkins build, please.
Since the file was such a ginourmous mess and since I touched pretty much the whole file I didn't bother separating this. I've rebased the commits a little more cleanly in zzattack/sdl2-test which I will force push over this once I'm happy with it.