move tree details to detail namespace
add tree.hpp
write a sequence of tree entries
encode the digest type in the binary tree file