Remove leftovers
Wrap db_query_install() around the common _jobs_prep() function
Use a better name for the jobs iterator function
Add a db_query() method for removal of packages
Re-open the database in remote mode when installing packages