Do not set package field to "" when setting NULL

pkg_set function should not try to set fields that are to set as NULL
as empty string "". However this updated behaviour should be tested.
Treat PKG_DIGEST as ordinary field.

Manifest digest is placed directly in 'packages' table, treat it thus
as an ordinary package's field.
Rework package repo iterators.

Hack pkgdb_repo iterators to follow pkgdb iterators semantics in
particular in having it->db->sqlite field. However this whole code
should be implemented in some straightforward way.
Fix pkgdb_repo initialization.

Avoid some desctructive operation while opening pkgdb_repo. This
code was incorrectly imported from pkgdb code.
More steps to incremental update.

Now we do not touch database before comparing local and remote
repositories. Updates are now postponed by list of proposed updates.

Implemented fetch-extract function to a temporary file.

Miscellaneous fixes to incremental update logic.

TODO: unbreak comparasion in some cases.
Merge branch 'master' of git://github.com/pkgng/pkgng