Update to libgit2 changes

- git_branch_move now returns a git_reference pointing to the new branch
- libgit2 no longer frees git_reference objects behind the users back