Remove goal choice nodes after reordering is completed.

This saves a lot of heap space while exploring the tree and backtracking.
Force the log for the error to be printed in parallel with the complete trace.

This saves a bit of heap space when running the solver with unlimited
backtracking enabled.
Extended a comment.
Fix warnings.
Ignore the cabal-dev dir in .gitignore.
Follow Win64 changes in GHC
Follow changes in base
Spelling.
80-col violation.
Fix warnings.
Redundant imports.
Fix typos.
Warn when 'cpp-options: -Idir' is used instead of 'include-dirs: dir'.

I'm looking at you, ansi-terminal.
Fix a typo (s/reative/relative/).
Add -threaded and -rtsopts to cabal-install's ghc-options.

We don't want FFI calls to block all Haskell threads, so we need to use the
threaded runtime; -rtsopts is for experimenting with the number of capabilities.
Make a diagnostic more clear.

It can be non-obvious why a package is registered more than once.
Add a '-j' flag for the 'install' command.
InstallPlan: Add a Processing package state.

We don't want 'InstallPlan.ready' to return packages that are currently
being processed in other threads.
Parallelise the install command This is based on Mikhail Glushenkov's patches.

It adds a '-j N' (= 'number of jobs') option for the 'install' command, which
can be used to specify the number of concurrent workers. If possible, at most
N packages will be built concurrently.

This version of the patch is less featureful than Mikhail's version but also
rather simpler. The key difference compared to Mikhail's version is that this
version is lacking the output serialisation and the ability to tag each output
message with the task it came from. All output is interleaved. The next step
will be to make parallel builds log to files rather than the console and only
to display a summary on the console.

In addition to not having to change the output functions, the code is a bit
simpler by keep the structure of the code the same as before, rather than
splitting it into a number of concurrent tasks with channels. Instead each
task simply executes the same pattern of install actions and concurrency
limits are enforced using semaphores.
Drop the "ghc-options: -rtsopts" on cabal-install. We do not need it.