* Move invariants out of loop (minor performance gain)

* Fix issue that miner could only work with diff 0.0039... or higher (not that that matters much now:)
* quick'n'dirty improve of hash pre-check