tree-cache: Free the tree upon the detection of a corrupted child
tree-cache: Zero out the allocated tree children array
tree-cache: Don't segfault upon corruption
tree-cache: Fix error message typo
index: Free the index on git_index_open() failure
Merge pull request #1968 from libgit2/ntk/fix/bad_index

Corrupted index is bad for your health
tests: Drop unrelated comment
Merge pull request #1969 from libgit2/ntk/fix/drop_comment

Cleaning up