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
Comments and reorg only
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
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)
Warn if you use -XTemplateHaskell in stage1

This should really be an error, but we'll just warn for now
Tidy up the error messages we get from TH in stage1 (Trac #8312)

Instead of panic-ing we now give a sensible message.
There is quite a bit of refactoring here too, removing
several #ifdef GHCI things
Wibbles to 'Tidy up the error messages we get from TH'
Improve printing of errors when the tycons look the same

See Trac #8278.  Example new message:

    Couldn't match expected type ‛T8278a.Maybe’
                with actual type ‛Maybe a0’
    NB: ‛T8278a.Maybe’ is defined in ‛T8278a’
        ‛Maybe’ is defined in ‛Data.Maybe’ in package ‛base’
    In the first argument of ‛f’, namely ‛Nothing’

The "NB" is the new bit
Allow optional 'family' and 'instance' keywords in associated type instances

This is to allow

   class C a where
      type family F a
      type instance F a = Bool

   instance C Int where
      type instance F Int = Char

Plus minor improvements relating to Trac #8506
Fix oversight in comverting tuples from TH to HsSyn (Trac #8507)
Fix typo in User's Guide

Signed-off-by: Austin Seipp <austin@well-typed.com>