Add primitives to write/read Integers to/from bytearrays

This adds the following new (internal) primitives

{{{#!hs
sizeInBaseInteger :: Integer -> Int# -> Word#

exportInteger :: Integer -> MutableByteArray# s -> Word# -> Int#
                 -> State# s -> (# State# s, Word# #)

importInteger :: ByteArray# -> Word# -> Word# -> Int# -> Integer
}}}

The import/export primitives support selecting most/least significant
byte first order as well as using an offset into the byte-arrays.

See Haddock comments for more details.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Improve pretty printing of IfaceAT in interface files
Fix marshalling of IfaceAt to and from interface files

I had forgotten about Note [CoAxBranch type variables] in CoAxiom

This patch fixes Trac #8500
Comments on mi_usages
Fix checking of shadowed names (fixes Trac #8499)
More comments on Usage and Dependencies
Clean-up Cmm of import/export primitives

This is a follow-up to e94799c9 fixing the Cmm implementation of the
primops based on suggestions by Duncan Coutts.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Comments and reorg only
Test Trac #8500
Test Trac #8499
Make -ddump-tc-trace imply -ddump-cs-trace
Add filterVarEnv
Untabify and whitespace
Refactor the constraint solver (again!)

There are three core changes here:

a) In the constraint-solver pipeline.
   Given a work-item 'wi', the old scheme was:
      let relevant = getRelevantInerts wi
      interact 'wi' with each constraint in 'relevant'
   Bu now we have a single step
      interact 'wi' with the inert-set

   This turns out to avoid duplication, between getRelevantInerts
   (which needs to know which are relevant) and the interact step.
   Simpler, cleaner.

   This in turn made it sensible to combine the 'spontaneous solve'
   stage into the 'interact with inerts' stage.

b) Wanteds are no longer used to rewrite wanteds.  See Trac #8450.
   This in turn means that the inert set may have
     - many CFunEqCans with the same LHS
     - many CTyEqCans  with the same LHS
   Hence the EqualCtList in teh domain of inert_eqs and inert_funeqs

c) Some refactoring of the representation of the inert set,
   Notably inert_dicts and inert_funeqs are indexed by Class and TyCon
   respectively, so we can easily get all the constraints relevant to
   that class or tycon

There are many knock on effects!  This started as a small job but I
ended up doing qite a lot.  Some error messages in the test suite
really did improve as a result of (b)
Untabify and whitespace
Error messsage wibbles
Peak megabytes for T1969 varies from run to run
Test Trac #8450
Zonk the type in reifyInstances (fixes Trac #7477)

A simple oversight, but crucial!  tcLHsType was returning
    F k Int
where k is a unification variable that has been unified with *
Improve a parser error message (Trac #8506)