libpacman: Remove undocument/unexpected behaviour to accept any db pointer as long has it has a valid treename in pacman_db_unregister.
pacman-g2: Vectorise sync duplication check in new trans_has_usable_syncs function.
pacman-g2: Move addpkg from add.c to trans.c
pacman-g2: Create trans_commit from addpkg.
pacman-g2: Drop addpkg and upgradepkg and replace them by trans_commit.
pacman-g2: Make removepkg and trans_commit more similar.
pacman-g2: Reduce trans_commit/removepkg differences even more.
pacman-g2: Isolate removepkg/trans_commit differences with switch/case.
pacman-g2: Merge removepkg in trans_commit.