Add a few reference utility functions
Merge pull request #59 from libgit2/cmn/refs

Add a few reference utility functions