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.