On install, update the .cabal file with the one from the index

This allows us to make minor changes to packages after they have been
released, without changing the package .tar.gz file. We already keep
the .cabal file outsite the package in the index and use it for
dependency planning. This already lets us do fixes such as making
dependency constraints tighter. Currently we cannot make dep
constraints more relaxed however, since the original .cabal file is
the one used when we get to the actual configure step.

So with this change, we now use the updated .cabal file for the
configure and build too. So there's more fixes we can do post-release.
In particlar, in combination with easier editing on hackage, this
should help us address the problems around the PVP and open or closed
version constraints. It should allow a system of conservative upper
bounds, but allow editing them when new versions of deps are released
and we find that they happen to work fine.
Extend the unpack command for the .cabal file updating

By default, "cabal unpack blah" will also update the .cabal file with
the one from the index, so it's consistent with what you get via
cabal install. Also added a --pristine flag so you can get the original
tarball without the updated .cabal file.
On install, update the .cabal file with the one from the index

(patch manually merged into the cabal-1.16 branch)

This allows us to make minor changes to packages after they have been
released, without changing the package .tar.gz file. We already keep
the .cabal file outsite the package in the index and use it for
dependency planning. This already lets us do fixes such as making
dependency constraints tighter. Currently we cannot make dep
constraints more relaxed however, since the original .cabal file is
the one used when we get to the actual configure step.

So with this change, we now use the updated .cabal file for the
configure and build too. So there's more fixes we can do post-release.
In particlar, in combination with easier editing on hackage, this
should help us address the problems around the PVP and open or closed
version constraints. It should allow a system of conservative upper
bounds, but allow editing them when new versions of deps are released
and we find that they happen to work fine.
Extend the unpack command for the .cabal file updating

By default, "cabal unpack blah" will also update the .cabal file with
the one from the index, so it's consistent with what you get via
cabal install. Also added a --pristine flag so you can get the original
tarball without the updated .cabal file.
Bump Cabal version number to 1.16.0.1
Bump cabal-install version number to 1.16.0
Always use either -static or -dynamic when compiling with GHC

-static is no longer necessarily the default
Merge branch 'master' of github.com:haskell/cabal
Update bug tracker location
Merge with cabal-1.16
Enable shared lib by default if using a compiler that does dynamic by default
Merge branch 'master' of github.com:haskell/cabal
Fix build as suggested by Ian Lynagh
Conditionally turn on dynamic-executable by default

If the compiler builds dynamic things by default, then so does Cabal.
Test suite: make the location of ghc and ghc-pkg configurable
Test suite: derive name of ghc-pkg from GHC
Test suite: pass the configured GHC version to more commands
Test suite: fix compilation error
Test suite: don't pass -w to Setup install, as it doesn't support it
Test suite: more helpful error messages when dynamic way test fails