Haskell extraction: put unsafeCoerce type declaration later

When Haskell extraction requires magic type coersion, Coq produces
the following code:

  unsafeCoerce :: a -> b
  #ifdef __GLASGOW_HASKELL__
  import qualified GHC.Base
  unsafeCoerce = GHC.Base.unsafeCoerce#
  #else
  -- HUGS
  import qualified IOExts
  unsafeCoerce = IOExts.unsafeCoerce
  #endif

GHC version 7.6.3 does not allow imports after a type declaration,
and produces this error:

  xx.hs:20:1: parse error on input `import'

(referring to the first import statement above).  This patch moves
the unsafeCoerce type declaration to just after the import statement,
fixing this compile error.
Haskell extraction: use explicit -XMagicHash instead of -fglasgow-exts

When Coq's Haskell extraction needs to use unsafeCoerce, it passes
the -fglasgow-exts option to GHC, but recent versions of GHC warn
against this:

  xx.hs:1:16: Warning:
      -fglasgow-exts is deprecated: Use individual extensions instead

This patch does as the warning suggests, replacing -fglasgow-exts
with the specific option that the extraction needs (-XMagicHash).