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
InstalledPackage 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>
> This packages

Typo?