Default 'library-for-ghci' to True on Windows.

Temporary workaround. Fixes #1589.
Add CPP pragma to D.Simple.Setup
Merge pull request #1594 from ttuegel/master

Add CPP pragma to D.Simple.Setup
'cabal configure' shouldn't accept the 'dependency' option.
Whitespace.
Formatting.
Fix the haddock --html-location= for relative URLs

The previous fix in isue #1407 turned out to be in the wrong place and
so applied to both the haddock-html from the ghc-pkg output, and also to
the location passed via the --html-location flag. For the
--html-location flag it is important that we can use relative URLs like
/package/$pkg-$version/docs because that is what we need for hackage.
Note that that is a relative URL, it's relative to the server root.
However that was being interpreted as a local file path and being given
the file:// prefix. So now we move the file:// URL stuff to the right
place so it only applies to the location given in the haddock-html field
of the package registration.
Similar absolute url fix for cabal-install

In this case with index generation it's more benign, but still better
to handle things consistently.
Whitespace.
Refactoring: extracting 'List.getPkgList' function out of 'List.list' function. The 'getPkgList' function returns list of packages and be used by external programs, when cabal-install becomes a library.
Merge pull request #1599 from wdanilo/master

Refactoring: extracting 'List.getPkgList' function out of 'List.list'
Copy-pasto.
Comments.
Refactoring: change the return type of 'InstallPlan.ready'.

Introduce a new type 'ReadyPackage' to represent packages that have all
dependencies already installed. Make 'InstallPlan.ready' return '[ReadyPackage]'
instead of '[(ConfiguredPackage, InstalledPackageInfo)]'.

Also fix a bug where 'cabal configure' didn't pass '--dependency' options to
'setup configure'.
Merge pull request #1592 from 23Skidoo/ready-package

Refactoring: change the return type of 'InstallPlan.ready'.
Documentation improvements.

Fixes #1600.
Typo, whitespace.
New 'install' option: '--allow-newer'.
New function: 'relaxUpperBound :: VersionRange -> VersionRange'.
Solver support for '--allow-newer'.

Implemented by going through all packages in the 'depResolverSourcePkgIndex' and
applying 'relaxUpperBound' to the dependencies listed in 'build-depends'.

Known issue:
'build-depends: a < 3 && >= 2; if (someFlag): build-depends: a >= 5 && < 6'
gets converted to
'build-depends: >= 2; if (someFlag): build-depends: a >= 5'
(4 is now allowed where it previously wasn't).

Example:

    $ cabal install --dry-run ./tst
    Resolving dependencies...
    In order, the following would be installed (use -v for more details):
    array-0.3.0.3 (latest: 0.5.0.0)
    tst-0.1.0.0 (latest: 0.1.1)

    $ cabal install --dry-run --allow-newer=array ./tst
    Resolving dependencies...
    In order, the following would be installed (use -v for more details):
    tst-0.1.0.0 (latest: 0.1.1)