Compare against repositories when comparing branches.
Use a pointer comparison as opposed to isEqual.

For a branch to be equal it must belong to the exact same repository
object.
Merge pull request #299 from libgit2/fix-branch-comparison

Compare against repositories when comparing branches.