Merge branch 'master' of https://github.com/ckolivas/cgminer
Take into account shed cores on hfa devices when determining how many jobs to send.
Revert "Restarts can rarely take a while on hashfast so increase the timeout to 1 second to avoid the usb flood failure."

This reverts commit c8648adaa8c5d726412c59f49131762d3fce13ec.
Updated BE hf protocol header.
Updated hf protocol header.
Set icarus device fail time to be dependent on device speed to avoid falsely detecting failure on slower AMU devices.
Increase to 25 nonce ranges on icarus fail detect.
Only memcopy *transferred data in usbutils if we have received only success or a non-fatal error.
Set each miner thread last valid work just before starting its hash loop in case there are delays at startup.
Transferred value is corrupt on a NODEV error in usbutils.
Reset the icarus failing flag only when a valid nonce is found.
We shouldn't be trying to read from the hfa_send_shutdown function itself.
Base the hfa failure time on the current expected hashrate instead of a static 15 seconds.
Limit the decrease of hfa clock rate on reset to the default clockrate.
Store last_getwork time on a per-device basis.
Provide a helper function for determining time between valid share and getwork per device.
Use the share_work_tdiff function in the driver watchdogs.
Correct share work tdiff
Per device last getwork won't work if the device stops asking for work.
Make hfa hotplug inherit some parameters from a previous instance if the serial number exists and is matching, avoiding dropping the clock on all devices.