Support module thinning and renaming Cabal-side.

NB: unlike GHC, Cabal will still try to find a globally consistent choice for
all package names, i.e. this does *not* implement private dependencies.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
That was what I did in the first version of the patch. Doing it this way reduces the amount of line changes elsewhere, especially in cabal-install where the Dependency data type is used verbatim.