patch applied (cabal): Refactor the internal handling of the "--user" flag into a PackageDB type