Fix deleting incorrect apps in package processor
Use SmartThreadPool
Get keyname id manually instead of using subqueries