checkhash: some work on a faster variant (wip)

This should not be used for all algos... not enabled yet

todo: multiple nounces or blake32 style checkup
Rework benchmark mode and min/max range

Was maybe my fault, but the benchmark mode was
always recomputing from nonce 0.

Also fix blake if -d 1 is used (one thread but second gpu)

stats: do not use thread id as key, prefer gpu id...
quark/blake512 opt. pointed by sp without asm

indeed, the pragma unroll doesnt always make things faster

asm part... to check later
min() and max(a,b) are not defined on linux,

in fact max exists in jansson includes (in tree only)

Add them to miner.h