Add some tests of our Haddock support
Bring a Haddock version check in line with message
Remove support for Haddock versions < 2.0

Dropping this support is unlikely to be a problem in practice.  Debian
oldstable is currently on version 2.6.0 of Haddock, for example.

This change enables future code simplification.  Currently we
preprocess both Haskell files requiring the CPP and Literate Haskell
files; newer versions of Haddock can handle these natively.

Fixes issue #1718.
Use Haddock's builtin support for .lhs and CPP

This is a code simplification on our end.

Thanks to Mikhail Glushenkov for the suggestion.
Fix: "cabal haddock" uses CPP overzealously

Until recently we supported ancient versions of Haddock, pre v2.0.  To
support the CPP extension with such versions, cabal had to invoke the
CPP before invoking Haddock on the output.  For simplicity cabal would
invoke the CPP on all Haskell files, if any Haskell file required CPP.
However, invoking CPP on a file which does not require it can cause
build failures.

Haddock v2.0+ supports the CPP via GHC, and even automatically
preprocesses any file with the {-# LANGUAGE CPP #-} pragma. Hence we
simply need only tell Haddock to enable the CPP when the CPP is a
package level default extension.

Fixes issue #1808.
Print full build log instead of only the last 10 lines
fixed documentation for hc-pkg hide
Merge pull request #1856 from BardurArantsson/print-full-log

Print full build log instead of only the last 10 lines
Merge pull request #1854 from iainnicol/haddock

Haddock support improvements
Revert "pass --no-check-certificate to wget"

This reverts commit 4167869874070d3aba1b6a8daadcd7ee6f96dbfc.

See discussion in #1796.
Merge pull request #1866 from bitemyapp/master

fixed documentation for hc-pkg hide
Add --enable-{tests,benchmarks} to freeze command

If they are present the dependencies of all test and benchmark stanzas are
included in the frozen set of dependencies.
Tests for the freeze command

Introduced a new test-suite, package-tests, which is intended for black-box
testing of the cabal binary.

The `PackageTests` module determines which cabal binary is to be tested and
runs the tests passing each of them the path to that binary. The binary is the
first cabal binary found on the path. To test a different binary, adjust the
PATH environment variable.

The `PackageTests.PackageTester` module contains common routines to execute
the cabal binary and check its results.

Finally, the `PackageTests.Freeze.Check` command contains some tests for the
freeze command.