Implement "reexported-modules" field, towards fixing GHC bug #8407.

Re-exported modules allow packages to reexport modules from their
dependencies without having to create stub files.  Reexports of the same
original module don't count as ambiguous imports when module finding
occurs.  The syntax is:

    "orig-pkg" OrigName as NewName

You can omit 'as NewName', in which case it is reexported as the same
name.  Self referential aliases work too; however, they're only visible
to packages which depend on this package.

Left to future work: just provide a module name 'OrigName', where ghc-pkg
figures out what the source package is.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Fix pretty printing with showFreeText

Remove the special casing for strings starting with a newline.
Handle all newlines in strings the same way, by replacing them
with a '.'.
Pretty print the field 'depends' nested
Fix pretty printing of flags

Pretty print the fields of flags nested.
Merge pull request #1998 from dan-t/master

Pretty print fixes
enable pkgconfig-depends for tests and benchmarks

implement a common BuildInfo processor for all package components

change names of component BuildInfo processors to be more descriptive
Merge pull request #1995 from mcox/pkgconfig-bugfix

enable pkgconfig-depends for tests and benchmarks
Better message when new cabal-install available

A common mistake new users of cabal-install seem to make is to run
`cabal update`, see the message "Note: there is a new version of
cabal-install available.", accordingly install a new version of
cabal-install by doing `cabal install cabal-install`, neglect to make
sure that the newly installed cabal-install executable is in their path,
and continue to run the cabal-install executable they had before.  The
next time they do `cabal update`, they see the same message and become
confused.

This commit changes the message in question to be more informative and
helpful.  In particular, if the currently running version of
cabal-install is older than the newest version available from hackage,
the user will not be told simply that "there is a new version of
cabal-install available", but rather will be informed exactly what new
versions are available, and what version they are currently running,
along with a hint to change their $PATH variable if it turns out they're
not running the version of cabal-install they thought they were.
Remove first-person and unix-specific language

In accordance with @23Skidoo's comments on github.
Merge pull request #2000 from kini/upgrade-available

Better message when new cabal-install available
Unbreak the build.
Don't use 'delegate_ctlc' when bootstrapping GHC.

See discussion in #1763.
Read installed package info file as UTF-8

Currently installed package info file is written in UTF-8. So UTF-8
should be used explicitly or it can cause "invalid byte sequence"
error if system encoding is incompatible to UTF-8.
Weaken dependency on process.

GHC 7.6 still distributes by default with an old version of process, which
means that requiring the most recent version prevents GHC from properly
bootstrapping out of the box.  In this patch, we relax the version requirement
on process, disabling proper ctl-c handling when the version is not sufficiently
new.

Perhaps one problem with lowering the bound, is if someone attempts to install
Cabal out of the box on GHC 7.6, the dependency solver will prefer the old
installed version, so it is very easy to end up with a cabal-install which
doesn't have working ctl-c.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Merge pull request #2007 from ezyang/ezyang-process-version

Weaken dependency on process.
Merge pull request #2006 from saturday06/read_installed_package_config_as_utf8

Read installed package info file as UTF-8
D.Compat.CreatePipe: use locale encoding

Issue #1895. `createPipe` opened handles in binary mode by default,
which mangles text encoded for the current locale. Now, `hSetEncoding`
is called on the new handles. This requires `base >= 4.2`.
Unit test to check locale of handles created with `createPipe`
Merge pull request #2011 from ttuegel/create-pipe-encoding

D.Compat.CreatePipe: use locale encoding
Merge pull request #1991 from ezyang/master

Implement "reexported-modules" field, towards fixing GHC bug #8407. (ROUND 2)