rewrite listPackagesFromChannel logic into database select

it's always better to return the result than to take a set of channel packages and installed packages and to make comparsion in the application
this also fixes an issue where a package was not reported for the second time if it was installed in 2 architectures (e.g i386 and x86_64)