Update hidapi code from git

This patch imports latest versions of original hidapi git master files to our tree.

The patch is very messy to read and if we have changes (did NOT just copy files from hidapi), may cause our changes to be lost: I simply copied any matching files from hidapi master in place to our tree as of February 2014 (forgot exact date). To review my changes against origin please fetch hidapi tree and run a manual diff.

I think there are some memory leaks fixed with HID hotplug in these patches, so this is important to include when my HID hotplug patch goes in.