Fix building the GHC package DLL on Windows

We now put a handful of modules in a separate DLL.
For now the list is hand-written, but we could automate it in the
future.
Merge branch 'master' of win:c:/ghc/git/cygwin/.
Follow changes in Cabal
Finish adding support for 2 DLLs in the ghc package; fixes #5987
Remove tabs and trailing whitespace from TcTyClsDecls
Implement nullary type classes (#7642)

This is a slightly refined version of a patch by shachaf,
done by Krzysztof Gogolewski <krz.gogolewski@gmail.com>.
By default, use the dynamic way for programs in the GHC tree

In particular, this means that GHCi will use DLLs, rather than loading
object files itself.
Set the way to 'dynamic' when running GHCi if GHCi is dynamically linked
Implement type family instance support for ":info" (#4175)

v2: added a couple of comments
Partial support for dynamic ghc on Windows
Disable DYNAMIC_GHC_PROGRAMS on Windows

It doesn't work yet
A little polishing
Fix searching for object files when doing TH

We were finding vanilla object files when TH needed dynamic object files.
Fix the handling of Opt_Static

There were some cases where we weren't unsetting it when turning the
Dyn way on.
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Update Cabal
Remove readIface's unused argument
Remove a bitrotted hack for OpenBSD and NetBSD regarding the dyn way.

On OpenBSD and NetBSD, we were accidentally passing "-optl-pthread" to
the gcc to build dynamic libraries because of a bitrotted hack for
those OSes, which resulted in a weird situation where every dynamic
library is named "ptl-pthread" and placed at "$(TOP)".

The hack in question were to work around a linkage problem with
libHSffi, but we no longer build it and just use libffi these days so
the hack can safely be removed.
Enable Opt_PIC for the dyn way regardless of OSes.

We were previously enabling Opt_PIC on certain OSes namely Windows,
Darwin and Linux, but it should always be enabled for the dyn way
because it makes no sense to try to generate non-PIC dynamic
libraries, which is usually impossible.
Also build the v way when DYNAMIC_GHC_PROGRAMS is YES

Technically we don't need the v way, but with -dynamic-too it's cheap,
and having it makes life easier.