allow Tree::deep_copy_from() to take functor to copy nodes