Adjust to libgit2 development branch

This wraps the previous functionality, though there are some iterator
changes we might still want to bring over.