Make Distribution.Simple.PackageIndex polymorphic in package storage.

The intent is to have cabal-install use this package index in order to
track information about compilation in progress.  We introduce a new
PackageInstalled type-class to keep track of data types which have their
IDs and dependency graphs in InstalledPackageId.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Suppress orphan warning pre-GHC 7.8

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
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.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>