Add test for blob/tree name collisions in index
index: Compare with given len
index: Implement folder-file checks
More index collision tests
Give index_isrch the same semantics as index_srch

In case insensitive index mode, we would stop at a prefixed entry,
treating the provided search key length as a substring, not the
length of the string to match.
Two-phase index merging

When three-way merging indexes, we previously changed each path
as we read them, which would lead to us adding an index entry for
'foo', then removing an index entry for 'foo/file'.  With the new
index requirements, this is not allowed.  Removing entries in the
merged index, then adding them, resolves this.  In the previous
example, we now remove 'foo/file' before adding 'foo'.
Force explicit remove of files instead of defer

The checkout code used to defer removal of "blocking" files in
checkouts until the blocked item was actually being written (since
we have already checked that the removing the block is acceptable
according to the update rules).  Unfortunately, this resulted in
an intermediate index state where both the blocking and new items
were in the index which is no longer allowed.  Now we just remove
the blocking item in the first pass so it never needs to coexist.

In cases where there are typechanges, this could result in a bit
more churn of removing and recreating intermediate directories,
but I'm going to assume that is an unusual case and the churn will
not be too costly.
Rename conflict to collision to prevent confusion
Fix checkout NONE to not remove file

If you are checking out NONE, then don't remove.
Merge pull request #2085 from libgit2/rb/index-tree-blob-collision

Index tree-bob collision
Add reflog params to set-head calls
Ensure updating HEAD updates reflog
Enhance clarity
Ensure creating HEAD creates its reflog
Add passing reflog tests
Add reflog params to git_branch_create
Augment clone API with reflog parameters
Deleting a branch deletes its reflog
Add reflog parameters to git_branch_move
Ensure renaming a reference updates the reflog