New method ``WorkingTree.flush()`` which will write the current memory
inventory out to disk. At the same time, read_working_inventory will
no longer trash the current tree inventory if it has been modified within
the current lock, and the tree will now ``flush()`` automatically on
``unlock()``. ``WorkingTree.set_root_id()`` has been updated to take
advantage of this functionality. (Robert Collins, John Arbash Meinel)