Fix util.h exports for cgsem_mswait
Check for correct timeout error in cgsem_mswait
Convert the usb callback function to use a cgsem_t using the timedwait code to avoid races with mutexes/conditionals.