revparse: Prevent unnecessary odb backend calls
revparse: Simplify error handling
Merge pull request #1835 from libgit2/ntk/fix/less_backend_calls_on_revparsing

Some revparse love