Fixes for upstream libgit2

git_branch_tracking -> git_branch_upstream

Also, seems to be lacking some definitions from libgit2;
include definition of odb_stream