Move all remote repo manipulations to pkgdb_repo.

As all db manipulations are the subject of pkgdb code it is a good
idea to move repository manipulations to pkgdb base. Hence, cleanup
sqlite code from pkg_repo and add pkgdb_repo.c module. This also
allows to perform incremental updates eventually by calling
pkgdb_repo routines.