optimize hotp.verify

To optimize the performance of the verification algorithm;
Fix counter pollution, cause the test may be more than expected;