'syncProcess': don't restore handlers before the child finished.

Fixes #1560.
Add an explicit way of specifying dependencies on the command line
e.g.,

--dependency="MyOtherLib=MyOtherLib-1.0-073259a42bbf95f818c899c57ba5bf30"

If the package names do not match

--dependency="foo=MyOtherLib-1.0-073259a42bbf95f818c899c57ba5bf30"

then this gives an error

Setup.hs: The following names do match their hash name:
(foo, MyOtherLib)

If the hash is incorrect e.g.

--dependency="foo=MyOtherLib-1.0-073259a42bbf95f818c899c57ba5bf31"

then this gives an error

Setup.hs: The following dependencies do not exist:
MyOtherLib-1.0-073259a42bbf95f818c899c57ba5bf31
Rearange and simplify the --dependency configure code a bit

Use a map from package name rather than from constraint, for the
info on the specific packages to use.
Capture installed package information.

The goal is to learn the installed package id of the package we just
installed, as necessary for #1860. We achieve this by inserting an
additional call to "setup register" that produces the installed package
information in a file. We read and parse that file and could now return
the installed package id, but it is not clear what interface would be
appropriate.
Create hashes from the solver install plan and pass these to cabal so
that the exact packages are installed rather than letting cabal choose
for itself (potentially choosing the package with the incorrect
hash). Closes: https://github.com/haskell/cabal/issues/1460.
Opinionated tweaking of the previous patch
Don't use the new flag with old cabals:

https://github.com/haskell/cabal/pull/1470#issuecomment-26668599
And don't use the old flag with new cabals

We generate both --constraint and --dependency flags, but we only need
to pass one or the other, depending on the Cabal version.
Bump version to 0.19.1

Since we now have a new version-dependent feature: the new --dependency
configure flag.
Merge branch 'installed-packageids' of https://github.com/haskell/cabal

Conflicts:
	Cabal/Distribution/Simple/Configure.hs
	cabal-install/Distribution/Client/Install.hs
	cabal-install/Distribution/Client/InstallPlan.hs
	cabal-install/Distribution/Client/Setup.hs