lib/db: get_all_packages() returns a list, add get_all_package_names()

returning the dict was exposing an implementation detail

Signed-off-by: Andreas Beckmann <anbe@debian.org>