Add VFS Node release() and release nodes during restore, after traversal.
Add a release() method to Node that will drop resources that can (and
will) be automatically restored when required -- though restoring the
resources may have a non-trivial cost. For now, drop the node's
metadata and its children.
Call node.release() in restore-cmd.py after restoring a node. This
substantially decreases the memory required by a restore because the
whole tree is no longer retained in RAM.
Thanks to Patrick Rouleau <prouleau72@gmail.com> for helping track
down the problem, and proposing a slightly different initial patch to
fix it.
Signed-off-by: Rob Browning <rlb@defaultvalue.org> Reviewed-by: Patrick Rouleau <prouleau72@gmail.com>