Don't freeze non-required installed packages

An InstallPlan contains installed packages in the package database which are
not required to satisfy the dependencies of the user targets. To prevent
including them in the frozen set of constraints, `Freeze.planPackages` uses
`D.C.PackageIndex.dependencyClosure` to try and take the transitive closure of
the package dependencies.

Whilst it is possible for `pruneInstallPlan` to fail, only valid
`InstallPlan`s are passed to it. If a failure does occur, we error.
Fix typo
Add support for 'main-is' to cabal init.

This includes a new flag, --main-is, as well as a new prompt that appears if the user selects the 'Executable' option or uses --is-executable.
Address review comments.
Fixed pretty printing of fields

The list constructors 'nestedListField' and 'nestedCommaListField'
have been added and are now used for fields that should be pretty
printed with nesting.
Add cabal exec
Merge branch 'do-not-freeze-non-required-installed-packages' of https://github.com/benarmston/cabal
Merge pull request #1770 from 23Skidoo/main-is

Add support for 'main-is' to 'cabal init'
80-col violation.
Generalise a function's type.
Sanity check.
Generalise another function's type.
Better pretty-printing of config sections.
Revert "Fixed pretty printing of fields"

This reverts commit fdf8afce5fa158634819bf64bad82a21159fc4d1.

Fixes #1771.
-Wall police.