Sync Cabal to upstream version 1.18 pre-release

Apart from bumping build-dep version bounds, `ghc-cabal` is adapted to
some minor Cabal API changes, and `bin-package-db` is made aware of
Cabal's recently added AGPL licence support.