restructure check_db to use _repoquery

restructure repoquery to not require parsing the pkginfo