Input code fixes

I tried to be extra careful, but this still needs review if the client DLLs (valve, dmc, ricochet) compile on Linux properly (they should).

Fixes ValveSoftware/halflife#1546
- fixed m_rawinput 1 mouse trapped inside a rectangle
- fixed thirdperson camera not working as it should

Fixes ValveSoftware/halflife#1558
- recoded mousethread and made it somewhat useful for very fast mouse
  movements (will reset CursorPos now) and thus also fixed some thread
  synchronization issues (hopefully)

Further fixes:
- Fixed IN_JoyMove doing nothing on Linux for ricochet client
- Limited mouse thread sleep to sane values between 0 and 1000

Does not fix the following:
- Original mouse button down/up reacting when scoreboard mouse is on bugs.

Things to discuss:
- the IN_ResetMouse call here in IN_GetDeltaMouse: Is it okay to call it in every case or should it be called only when mx or my changed? Please note that in IN_AcummulateMouse in the originial code IN_ResetMouse is always called, so that would have to be made conditional too then, I guess.