merge merkle tree

- adding  PR for comments
would it make more sense (more erlangish) to return `{error, mtree_invalid_bin}` here? This makes it clear that invalid bins are not expected to the return caller.