Treat foreign imported things in CMM as being in this package

They used to be treated as being in an exnternal package, which went
wrong on Windows (it tried to call them via an imp wrapper, rather
than calling them directly).
Fix dynamically linked GHC on Windows

This is a rather ugly hack to fix dynamically linked GHC on Windows.

If GHC is linked with -threaded, then it links against libHSrts_thr.
But if base is linked against libHSrts, then both end up getting
loaded, and things go wrong. We therefore link the libraries that
link against the RTS with the same RTS flags that we link GHC with.
Fix the name of libffi

On Windows, we need to keep the DLL called libffi-6.dll (rather than
libffi.dll) or Windows can't find it.
Generate dependencies for .cmm files properly