refs: Don't try searching for input strings that can't be objects

I noticed OSTree was a bit slower, did some investigation
and saw we were enumerating all objects for things like

$ ostree rev-parse blah

Since "blah" can never be an object (because of the 'l' and 'h'), just
return no matches.