Don't go through "resource" column when "certname" works
Don't go through "resource" column when "certname" works

This avoids duplicates in the case where there are multiple matching
resources, and is much faster to boot!

grimradical/puppetdb,johnduarte/puppetdb,highb/puppetdb,grimradical/puppetdb,waynr/puppetdb,senior/puppetdb,puppetlabs/puppetdb,mullr/puppetdb,highb/puppetdb,github/puppetlabs-puppetdb,kbarber/puppetdb,kbarber/puppetdb,nfagerlund/puppetdb,mullr/puppetdb,grimradical/puppetdb,wkalt/puppetdb,kbarber/puppetdb,rbrw/puppetdb,mullr/puppetdb,senior/puppetdb,mullr/puppetdb,jantman/puppetdb,jantman/puppetdb,ajroetker/puppetdb,wkalt/puppetdb,waynr/puppetdb,kbrezina/puppetdb,waynr/puppetdb,kbrezina/puppetdb,github/puppetlabs-puppetdb,cprice404/puppetdb,kbarber/puppetdb,jantman/puppetdb,shrug/puppetdb,kbrezina/puppetdb,ajroetker/puppetdb,highb/puppetdb,rbrw/puppetdb,kbrezina/puppetdb,ajroetker/puppetdb,rbrw/puppetdb,github/puppetlabs-puppetdb,waynr/puppetdb,senior/puppetdb,johnduarte/puppetdb,senior/puppetdb,puppetlabs/puppetdb,mullr/puppetdb,melissa/puppetdb,cprice404/puppetdb,shrug/puppetdb,puppetlabs/puppetdb,nfagerlund/puppetdb,grimradical/puppetdb,highb/puppetdb,ajroetker/puppetdb,wkalt/puppetdb,johnduarte/puppetdb,wkalt/puppetdb,johnduarte/puppetdb,rbrw/puppetdb,cprice404/puppetdb,puppetlabs/puppetdb,shrug/puppetdb,melissa/puppetdb,rbrw/puppetdb,nfagerlund/puppetdb,puppetlabs/puppetdb,shrug/puppetdb,melissa/puppetdb