fix infinite loop in bytes_cpy when size is zero
bytes_cpy: avoid malloc and memcpy when size is zero
Merge pull request #253 from iongchun/fix-bytes-cpy

fix infinite loop in bytes_cpy when size is zero
Bugfix: Only trigger staged work underrun if a mining thread was actually waiting for it (and do so sooner, before it has the work made)
Bugfix: Reset staged_full flag when discarding (stale) popped work, or increasing the queue minimum
Merge commit '804ca22' into bfgminer
Bump version to 3.1.3