Made destructive operations automatically stash the tree they
destroyed and return a RefactStashId, which can be used later or ignored.