repository: move to use a git_buf for outputting strings

Since we now export that type, we can avoid making the user guess a
size.
branch: move to git_buf when outputting newly-allocated strings

Internally we already did everything with git_bufs, so this is just
exposing those functions with public names.
config: use git_buf for returning paths

Again, we already did this internally, so simply remove the conversions.
messsage: use git_buf in prettify()

A lot of the tests were checking for overflow, which we don't have
anymore, so we can remove them.
refspec: move to git_buf for outputting strings
Merge pull request #2077 from libgit2/cmn/buf-out

Buff up returning strings