Bugfix: miner: Check work->blk.nonce to see if work should be abandoned

While this doesn't change behavior outright, it makes the intentions clearer.
Until recent changes the driver scanhash() method would always return the total number of hashes done. This would in turn be (conditionally) assigned to the max_hashes for that device.
Recent changes adding support for per-processor statistics for scanhash-based devices have changed this assumption. In these cases, max_hashes alone may not be a reliable indication of whether the device / driver scans a full nonce range.