Replace branch name manipulation with libgit2 functions
Optimize GTBranch.remoteName even further