Make bup-split commits appear as files to the vfs layer.

When viewing branches that were generated by bup-split through bup-fuse
(or any other frontend relying on vfs.py), these are presented as trees
of the hashsplitted blobs. This means that bup-split output is only
usefully accessible through bup-join.

This change makes bup-split store named commits such that they appear as
files, named with the last component of their branch name(*). That is,
from the vfs layer, they now appear like so:
    branch_name/latest/branch_basename

(*) While bup doesn't currently handle slashes in branch names, patches
    to this end are on the mailing list, so this patch should handle
    them, in anticipation of their general support in bup.

To address potential concerns: the storage format is changed in subtle
ways, in that the top level tree now contains a "normally" named object,
rather than byte-offset names.  However, bup-join doesn't care about
this, and as bup-join was previously the only way to use these commits,
the user experience is not affected.

We also add a test for the new functionality. (The test uses an empty
string as input data, because this is the second way in which this patch
changes the behaviour of bup-split: previously, passing empty strings to
bup-split would make it generate an empty git tree, whereas now it
relies on hashsplit.split_to_blob_or_tree() to make a blob for the empty
string. This is meaningful because vfs.py chokes on empty git trees.)

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
[rlb@defaultvalue.org: rebase to current master; adjust code indentation.]
Always name the top-level split file "data", instead of the branch basename.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Merge work to have "bup split" produce a top-level VFS file.
save-cmd.py: hashsplit .bupm metadata files.

Previously the metdata for each directory's content was being written
as a single blob, with no deduplication -- probably not what we want.
Fix it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
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>
Merge https://github.com/bup/bup

Conflicts:
	lib/bup/vfs.py