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
Update .gitignore.
Save timestamps of add-source dependencies in 'sandbox add-source'.
80-col violations.
Refactor 'prepareTree'.

Factor out the parts that are used to list all source files mentioned in a
package description.
Move timestamp functions to their own module.
80-col violations.
Make 'inDir' a bit more polymorphic.

The change doesn't affect existing code.
Actually implement the timestamp check in 'reinstallAddSourceDeps'.
Replace a conditional with a guard.
Use maybeToList.
Comment.
Merge pull request #1292 from 23Skidoo/minimal-rebuilds

Minimal rebuilds for add-source dependencies
Comment.
When GHC is dynamic, only build dynamic /libraries/ by default

We don't want to defult to building executables the dynamic way too.
Merge branch 'master' of github.com:haskell/cabal
Add a way for the caller to tell whether the deps were reinstalled.