This commit implements 'prospective leaf hashing' -- computing what the
hash of a sparse Merkle tree leaf *would* be for a key-value insertion
without actually performing that insertion.
For SimpleSmt, this is trivial, since the leaf hash and its payload are
the same.
For the full Smt, the new leaf payload (and thus, its hash) depend on
the existing payload in that leaf. Since almost all leaves are very
small, we can just clone the leaf and modify a copy.
Future work could optimize the uncommon SmtLeaf::Multiple case and
avoid a heap clone by combining the normal insertion logic and the
normal hash logic without an intermediate leaf value.