Change package_db collection of packages from vector to a map so we can look things up in it quickly
This allows packagedb::findBinary() and packagedb::findSource() to be re-written to locate packages
by name rather than searching the entire set, which makes a big difference to total execution time.
* IniDBBuilderPackage.cc (IniDBBuilderPackage): Remove db.packages vector
sorting.
(buildPackage, buildPackageSource): Change package collection from vector
to map.
* PickView.cc (setViewMode, init_headers, defaultTrust): Ditto.
* choose.cc (createListview, logResults, keepClicked)
(changeTrust): Ditto
* install.cc (do_install_thread): Ditto
* download.cc (do_download_thread): Ditto
* prereq.cc (isMet): Ditto
* package_meta.cc (ScanDownloadedFiles): Ditto
* package_db.h (packagedb): Ditto
* package_db.cc (packagedb, flush, markUnVisited, setExistence)
(fillMissingCategory): Ditto
(findBinary, findSource): Rewrite to locate packages in map rather than
searching the whole vector, for performance.
(ConnectedLoopFinder, doIt, visit): Rewrite to refer to package using a
packagemeta *, as an index into the vector of packages can no longer be
used.