Fix for GHC 7.10

In order to make `cab` build with GHC HEAD and `Cabal-1.22`, I had to make a few minor tweaks:

* I added an explicit type signature to `isCabal` in `Distribution.Cab.GenPaths`, because otherwise, GHC 7.10 will [try to infer](https://downloads.haskell.org/~ghc/7.10.1-rc1/docs/html/users_guide/release-7-10-1.html#idp5770992) that the module needs `FlexibleContexts`.
* In `Cabal-1.22`, `PackageIndex` is now polymorphic, so I used `InstalledPackageIndex` instead (which is just a type synonym for `PackageIndex InstalledPackageInfo`).

There's also the issue of `versionTags` from `Data.Version` being deprecated, but the functions to [work around that](https://git.haskell.org/ghc.git/commitdiff/5b8fa46ca37caa9ec83b217a697628135da34506) were introduced to `base` only very recently, so I'll hold off on changing that.