Switch to zero-alloc Merkle tree algorithms
This replaces crypto.MerkleRoot
and crypto.VerifyRangeProof
with zero-alloc implementations. Profiling indicated that these functions were responsible for the majority of Merkle-related allocations.
(It is not possible to provide zero-alloc implementations in the merkletree
package without sacrificing generic-ness, because merkletree
uses the hash.Hash
interface instead of blake2b directly.)