Suppress orphan warning pre-GHC 7.8

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Add extra network dependency to make sure dep solver gets it right.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Make Distribution.Simple.PackageIndex polymorphic in package storage.

BC note: renamed type PackageIndex :: * to InstalledPackageIndex.

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>