Ensure load of files for remote packages.
Rework integritycheck procedure to use uids.
Improve searching of local and remote packages.

Do not re-query databases in case if a package is already in the
universe. That also saves some pkg_free calls.
Do not break upgrade chains when changing uid.