Make ReplayLog generic
This makes ReplayLog
generic, so that we will be able to use to to check that PoW nonces are unique in the future.
This was done basically according to the plan in doc/dev/notes/service-side-pow.md
, with the exception that it's set up so that hashing is done only in the IPT-specific implementation, and the types are set up such that other implementations don't have to hash their messages (although they can if they want)