More steps to incremental update.

Reorganize pkgdb_repo initializing functions to avoid mess with
pkgdb and pkgdb_repo function.

Small updates to pkgdb_it handling, however, the whole API should be
reconsidered to have pkgdb_repo_it as separate iterator type.

Incremental updates now can add or delete real packages but this
code is not tested yet.

Pkg repo code is updated accordingly.

TODO: implement pkgdb_repo_it.
TODO: test incremental updates.
TODO: reconsider pkgdb and pkgdb_repo functions once more and separate
repository functions completely.