Hid Fix

The long awaited HID fix - with thanks to Tim from some last help on threading, and Till and Alberto and Scott for suggestions on HIDFunc, Arthur Sauer for lending me a Mac, and BEK and the other contributions for financial support.

Though there are still some last things that can be addressed in the backend, I think this is ready to merge and expose for broader testing!

Please note that unfortunately, this branch also contains some commits from me from Apr 10, 2013, that have nothing to do with HID, and I am not sure that these commits should go in, but also have no idea how to remove them in a proper way... suggestions/help from git experts is welcome!