Resync with master of hidapi at signal11

Mostly to pull in bug fixes and improvements, especially the setlocale() fixes on Linux.