peel: reject bad queries with EINVALIDSPEC

There are some combination of objects and target types which we know
cannot be fulfilled. Return EINVALIDSPEC for those to signify that there
is a mismatch in the user-provided data and what the object model is
capable of satisfying.

If we start at a tag and in the course of peeling find out that we
cannot reach a particular type, we return EPEEL.
Merge pull request #2718 from libgit2/cmn/peeling-errors

peel: reject bad queries with EPEEL