[server][DBClientHatohol] Use a join with the hostgroup table for getting a host list only when it's really needed.