tests for checkout index with conflicts
checkout (from index) can write conflicts
Prevent checkout_tree when conflicts exist, clear NAME on checkout tree

Prevent checkout tree when unresolved changes exist (unless FORCE flag
is specified).  Clear NAME table when checking out, to avoid
checkout_conflicts from attempting to manipulate it.  Ensure that NAME
is also cleared at reset.
checkout rename conflicts

rename conflict tests for checkout conflicts, don't suffix filenames
when checking out with USE_OURS or USE_THEIRS
Get rid of some quick hacks
Don't overwrite ~ files checking out conflicts

If a D/F conflict or rename 2->1 conflict occurs,
we write the file sides as filename~branchname.  If
a file with that name already exists in the working
directory, write as filename~branchname_0 instead.
(Incrementing 0 until a unique filename is found.)
Fix warning, fix memory leak
Honor UPDATE_ONLY bit when checking out conflicts