use string instead of function for hash name

... to make the Hash interface work the same way as the KDF.PBKDF2 interface,
where the hash functions are given as strings rather than a function.
fix reversing in BufferReader/BufferWriter

The former way of reversing a buffer in BufferReader wasn't unsatisfactory.
I've now added readReverse() and writeReverse() methods to BufferReader and
BufferWriter respectively which is better and more consistent. And in the case
of BufferWriter, which had its own ad hoc reverse method, is also faster.