common: Update thread.c/.h to match the one from libusbmuxd
9 files changed