simplified HOTP operations using struct

Three functions of the `hotp` module performed such format conversions "manually" that are provided by the `struct` module. The unit tests ran fine, the code is shorter and IMHO more readable -- and could be even faster (no unnecessary modulos and intermediate formats), although I haven't measured that.