ghc: several enhancements to the new "with-packages" wrapper

 1) The wrapper erroneously used the ghc-pkg flag "--package-db" instead of
    "--global-package-db". The result was that packages installed locally in
    ~/.ghc and ~/.cabal were invisible to GHC. This has been fixed.

 2) The wrapper now deals gracefully with an empty package set: if no package
    is requested to be included in the wrapped environment, the wrapper just
    installs a pristine GHC.

 3) Correctly configure the "docdir" path returned by ghc-paths.

 4) Added some comments that describe the idea behind our ghc-paths patches and
    gives users same sample shell code that can be used to import our special
    environment variables into the currently running shell, so that programs
    outside of the wrapped environment can use them, too.
Re-implement ghcWithPackagesOld as a variant of ghcWithPackages that ignores collisions.

This change is intended to fix <https://github.com/NixOS/nixpkgs/issues/1161>
and to address some of the concerns that come up during the discussion of
<https://github.com/NixOS/nixpkgs/commit/d64917ad17277b8e16893ee31533ec2e33446fa7>.