fix sched_setaffinity parameter : sizeof(cpu_set_t)
SCHED_IDLE and SCHED_BATCH can only be used with sched_priority 0

The function was randomly failing to drop the priority, because the
field was not initialized - it was random garbage instead of 0, leading
to EINVAL.
Fix processor count detection with HW_NCPU
Merge commit 'fd83783' into bfgminer-3.10.x