[hacc] Fix Document to_tree
[rata] Use hacc::Document for state file
[everything] use hacc::Documents everywhere