Switch InstallPlan over to using IPID-indexed PackageIndex.

While this doesn't let us get rid of Distribution.Client.PackageIndex,
it does make InstallPlan more flexible, so we can have the same
package name-package version in the install plan multiple times.
We do this by synthesizing fake installed package IDs to act
as placeholders prior to compilation.

There is some shindig with 'FakeMap' in PackageIndex, check out
the Note in that file for more details.

This reverts commit a5a0f8e1959003ee702c04a23375a60d48f03f90, with
a bugfix for linearizeInstallPlan.

Fixes #2123
Better diagnostic information for install plans.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Whitespace, 80-col violations.
Workaround for GHC issue 8825.
Merge pull request #2165 from 23Skidoo/ghc-issue-8825

Workaround for GHC issue 8825.
'cabal check': Add a warning for 'ghc-prof-options: -auto-all'.

Fixes #2162.
Cabal...Utils: Add functions listUnion/listUnion/ordNub/ordNubRight.

These functions are from Mikhail Glushenkov's cabal/ghc-options-union
branch.
Cabal: Add a NubList type with tests.

A NubList is a list where all elements are unique, but are maintained in
their original order. The Monoid NubList's mappend implement is just:

    NubList xs `mappend` NubList ys = NubList . nub $ xs ++ ys

which preserves NubList's required properties (ordering and unique-ness
of elements) and meets the requirements of the Monoid laws (identity,
associativity and closure).
cabal-install: Use NubList for list fields of SavedConfig.

User config fields like 'remote-repo', 'extra-prog-path' and 'build-summary'
were lists, which mean that when two SavedConfig types were concatentated
the lists for these fields were concatenated, resulting in duplicate entries.
Duplicated entries in these fields simply don't make sense, so we swicth to
NubList for these fields.

Closes: #2160
Merge pull request #2167 from erikd/nublist

Nublist
Make the default doc index file path compiler/arch/os-dependent.

Fixes #2135.
Remove the self-upgrade check.

Fixes #2089.
Add a right-biased variant of 'NubList'.
GhcOptions: use `NubListR` where appropriate.

Some Cabal API clients apparently use `foldl mappend` on large lists of
`GhcOptions` records. Fixes #2110.
80-col violations.
Merge pull request #2111 from 23Skidoo/ghc-options-union

GhcOptions: use `NubListR` where appropriate.
Remove support for Hugs and NHC98.

Fixes #2130.
Merge pull request #2090 from 23Skidoo/no-update-check

Remove the self-upgrade check.
Merge pull request #2168 from 23Skidoo/remove-hugs-and-nhc-support

Remove support for Hugs and NHC98.
cabal-install : Add a 'user-config' command.

The 'user-config' command allows pseudo-diff-ing and updating of the
user's ~/.cabal/config file. The diff is against what cabal would
generated if the user config file did not exist and the update
command overlays the user's existing settings over the current
version of the default settings and writes it back to ~/.cabal/config.

Closes: #2159