Build shared libraries by default when building for a dynamic ghc; fixes #7846

GHCi will need a shared library, so we build it by default
Rename if* to when* in Distribution.Simple.GHC

This better matches standard Haskell names
When compiling with GHC, use -dynamic-too when it is safe to do so
Merge github.com:haskell/cabal into HEAD