Adjust to libgit2 development branch

This wraps the previous functionality, though there are some iterator
changes we might still want to bring over.
Branch: move from foreach to the iterator
Index: adjust to index_read() force flag