Add content offset to git_diff_line

For additions and deletions, external consumers like subversion
can make use of the content offset to generate diffs in their
proprietary formats.
cleaning code, removing unused variables
Merge pull request #1967 from victorgp/cleaning-code-minor-change

Cleaning code, removing unused variables
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
util: NetBSD doesn't have qsort_r either
Merge pull request #1970 from ghedo/netbsd_qsort

util: NetBSD doesn't have qsort_r either
Merge pull request #1966 from nickh/patch_content_offsets

Add content offset to git_diff_line