revparse: Free left side of invalid range revspecs

This fixes a small memory leak in git_revparse where early returns on
errors from git_revparse_single cause a free() on the (reallocated) left
side of the revspec to be skipped.
revparse: Use more idiomatic error value test
Merge pull request #1784 from evhan/development

revparse: Free left side of invalid range revspecs