revparse: Simplify temporary reference freeing
revparse: Introduce git_revparse_ext()

Expose a way to retrieve, along with the target git_object, the reference
pointed at by some revparse expression (`@{<-n>}` or
`<branchname>@{upstream}` syntax).
revparse: Make revparse_ext() return git_reference from names as well
Merge pull request #1568 from nulltoken/topic/revparse_ext

Introduce git_revparse_ext()