Replace all references to the old n*sleep functions with the equivalent cgsleep_*s replacements.
TimeBeginPeriod and TimeEndPeriod do not add significant overhead when run the entire time for cgminer so avoid trying to maintain balanced numbers of them for specific time calls to simplify code.
Use the reentrant cgsleep functions for usecps in usbutils.
Rename cgsleep_prepare_r as cgtimer_time to get time in cgtimer_t format and call cgsleep_prepare_r as a macro for cgtimer_time
Provide cgtimer_to_ms helper functions.
Provide cgtimer_sub helper functions.
usbutils add cps stats estimates
Merge pull request #479 from kanoi/master

usbutils add cps stats estimates
usbutils cps sleep_estimate is not an underestimate
Merge pull request #480 from kanoi/master

usbutils cps sleep_estimate is not an underestimate
Thread reportin and out can be static non inline.
Only report threads in and out in queued work devices across a get work since the rest happens asynchronously and the get work is what the device might be waiting on.
We don't want to continue into the hash_pop function if the getq is frozen.
Provide a message and set a bool when no work is available from any pools and when it resumes again.
Only display the no pool work message once if there are multiple waiters in hash_pop
Reorder support names alphabetically.
Stratum is used more often so test for it first.
Return positive for cnx_needed when no_work is true.
Check for cnx_needed on each loop through wait_lp_current.
Add avalon HW error% to stats and only show BTB variables if avalon is a BTB.