Un-reverse the bitcoin_hash type in memory

With this change, the reversal only takes place in the encode_hash
and decode_hash functions.