Fix timing issues with the totp_no_pin and totp_pin test cases

The TOTP test cases may fail if the clock ticks into the next time window
between setting the time and generating the one-time passwords.  We should make
sure that the codes are always generated with the correct time.


