Add Data and Typeable instances for many types exported by Cabal.

Note: this adds an orphan Data instance for Data.Version. A fix has been
proposed upstream.
Merge pull request #1243 from davidlazar/master

Data/Typeable instances
Make 'cabal install Cabal' work again.

Restores old behaviour broken in 7fa7d17862e39635012aaf749f9872216e9b9023.
Fixes #1245.
Merge pull request #1246 from 23Skidoo/cabal-install-Cabal

Make 'cabal install Cabal' work again.
tryGetConfigStateFile: fix typo
Fix a warning.
Make rawSystemStdInOut more verbose on error.
Make it possible to build empty libraries again.

Restores old behaviour broken by @igfoo in
8395c5db800284c9e2b54b5c45b94c4a3bfdfcf2. Fixes #1241.
Trailing newlines.
Make TestSuiteExeV10/TestWithHpc check hpc version.

Fixes #1206.
80-col violations, whitespace.
Fix building of exes that use TH and profiling.

Fixes #1207. Broken by @dcoutts in 02f8eef1c0592ab90238de29c2fe88ec89c85c2f.

Combined with the hpc fix, this makes all tests pass on my machine.
Add a test for #1241.
Merge pull request #1249 from 23Skidoo/issue1241

 Make it possible to build empty libraries again.
Merge pull request #1250 from 23Skidoo/check-hpc-version

Make TestSuiteExeV10/TestWithHpc check hpc version.
Merge pull request #1251 from 23Skidoo/failing-tests

Fix building of exes that use TH and profiling.
don't repeat this four times in the haddocks
Add Eq instances for PError, PWarning and PackageCheck
Fix typos
Merge pull request #1259 from ggreif/master

Typos