Remove the 'sandbox-*' commands.

Preparation for merging sandbox commands with their normal counterparts.
Comment.
New function: classifyPackageEnvironment.
New function: loadUserConfig.
Add a ForceGlobalInstall argument to configPackageDB'.

We use userInstallDirs in sandbox mode to prevent cabal-install from doing
unnecessary things like invoking itself via 'sudo' (see commit
7b2e3630f2ada8a56bf9100144e1bb9acbe6dc6a and 'rootCmd' in D.C.Install), but in
this particular case we want userInstall to be False to prevent UserPackageDB
from being added to the package DB stack (see #1183 and interpretPackageDbFlags
in D.S.Configure).
Add helpers for working with the PackageEnvironment type.

These allow us to work uniformly with @PackageEnvironment@ and @SavedConfig@,
thus reducing boilerplate.
Merge the 'configure' and 'sandbox-configure' commands.
Comment.
Merge the 'sandbox-install' and 'install' commands.
Reindent for consistency with the rest of the file.
Merge the 'sandbox-build' and 'build' commands.
Add support for the sandbox mode to the remaining commands.

The commands that are implemented with 'wrapperAction' (haddock, hscolour,
register, clean, copy) don't require 'withSandboxDirOnPath', so their code is
not modified.
Reindent for consistency.
Refactoring.

Replace the confusing MaybePkgEnv type with a (UseSandbox, SavedConfig)
tuple. Code in Main.hs is a bit uglier now.
Rename 'usingSandbox' to 'isUseSandbox'.

Rationale: consistency with existing precedent ('isJust'/'isNothing').
Make 'test' and 'bench' install add-source deps if we're in a sandbox.

Makes sense because they're basically doing 'cabal build' on each invocation.
Merge sandbox UI changes

The standard commands (e.g. configure, build) now use the sandbox, if
present.
cabal-install: put the Paths_cabal_install.hs and Paths_Cabal.hs in place as expected
disable hackage's preferred-versions (as we don't use it when merge ebuilds)

hackage.haskell.org/00-index.tar contains preferred-versions for some interesting
packages. For now it's 'base-3'.

Otherwise depends generated by hackport differ from ones pulled by ./Setup.hs.
cabal/cabal-install: renamed D.C.Exception -> D.C.ExceptionCI to avoid clash with Cabal's one

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>