WebDAV support for bup-web

Read-only WebDav implemented natively inside the bup-web server. Starting
bup-web now seamlessly handles WebDAV-protocol requests on the same address.

Tested working with Windows 7 Web Client and Linux via GVFS.
Add --graft and --regraft support to bup-index and bup-save

--graft enables the user to map real paths to specific logical paths
inside bup's archive.

--regraft enables changing the real path mappings without removing
existing index state (or rewriting the index).

Internally the bupindex now stores the representation of the logical bup
filesystem as the user intends it. A .grafts file stores the real paths
necessary to recover the original filenames.

bup-save now operates on logical bup repository paths rather than
literal paths.

Signed-off-by: Will Rouesnel <w.rouesnel@gmail.com>
Remove left over call to ungrafted rig.iter in index-cmd.py

This line was left over from merging and is unnecessary. It may have
been affecting indexing behavior.
Fix a bug with initializing offset positions in GraftWriter

GraftWriter did not track offset positions properly in the deduplication
dictionary, which resulted in subsequent executions corrupting the index
graft_point data and setting it all to 0s.
Add regression test for GraftsWriter not preserving old grafts.

The test checks that trying to store the same grafts out of order from
a previous run produces the same file offsets for the indexer.
Assign minimal metadata to metadata objects in protocol.py

Some nodes will never have metadata, particularly in the case of grafted
paths. So a default blank metadata needs to be sent to keep the protocol
synchronized.
Modify metadata to support storing the git file mode.

In the advent that a VFS node has no metadata, it would be nice not to
break the normal metadata features. This patch adds a new tag _rec_vfs
which stores the git file mode which the VFS falls back on.

This tag will normally never be used unless explicitely enabled, so
there is no overhead.
Add tprotocol.py for protocol specific tests.
Merge branch 'remote-restore-server-protocols' into index-grafts-ce
Merge branch 'bup-webdav-v2' into cutting-edge
Replace print calls with debug1 in web-cmd.py

All of the print output here is actually debugging output, and should
rightly be directed to stderr and controlled by the BUP_DEBUG triggers.

We might want to use stdout in the future for serving HTTP over stdio.
Add support for binding to unix domain sockets in bup-web.

Add the -s and --socket parameters, which allow entering a filename and
binding to a unix domain socket using the tornado server.