Fix bug with totp_generate() and long timestamps

* Properly cast timestamp parameters to longs when necessary.
* Add OATH Toolkit tests for totp_generate().