Use new style for instead of explicit iterators and reduce lookups
Fix after_hash (should be the same as before hash for identical files)
Remove indirection from process_tree
Make get_tree_hash argument const
Use emplace_back in favor of push_back
Reduce memory (re-)allocations