Print dbg counters after bench

Print last debug counters update just
before to exit benchmark.

Suggested by Stephane Nicolet.

No functional change.
Small simplification in gives_check

Use switch statement also for normal case.

No speed regression.

No functional change.
Use std::count in pos_is_ok()

No functional change.
Merge hash key computation functions

No functional change.