git for-each-ref: allow general objects

Introduce an `--objects` option which makes git-for-each-ref into
git-for-each-object, i.e. the non-option arguments are treated as
general revision arguments specifying any object. In this mode,
the refname output field reproduces the revision argument:

git for-each-ref --objects v1.7.9-rc2 v1.7.9-rc2^{commit} v1.7.9-rc2^{tree}
eab05abaeb51531e11835aaa4c26564a1babebac tag    v1.7.9-rc2
bddcefc6380bd6629f3f12b5ffd856ec436c6abd commit v1.7.9-rc2^{commit}
3382700b2f37c2e6e243c04b8c87bab6f125ca98 tree   v1.7.9-rc2^{tree}

`git for-each-ref --objects` can be aliased to `git for-each-object`
internally or by the user later on.