Comments only
Optimise partitionFunEqs for the 'false' case

In the examples from Trac #9872 we were getting a large set of inert CFunEqCans,
and partitioning them was taking ages.  This patch improves it somewhat by optimising
the partition for the case where the predicat is false.

The ticket has more info.
Improve the treatment of AppTy equalities

This patch is mainly just refactoring, but it improves performance a bit where
there is a nested chain of AppTys, and I think it's easier to understand.
Comments and variable names only, in type checking of (e1 $ e2)

No change in behaviour
Revise the inert-set invariants again

In particular this patch

- Accepts that rewriting with the inert CTyEqCans should be done recursively
  (hence removing the Bool result from flattenTyVarOuter)

- Refines the kick-out criterion, in paticular to avoid kick-out of (a -f-> ty)
  when f cannot rewrite f.  This is true of Wanteds and hence reduces kick-outs
  of Wanteds, perhaps by a lot

This stuff is not fully documented because the details are still settling, but
it's looking good.

(And it validates.)

This patch includes the testsuite wibbles.  perf/compiler/T5030 and
T5837 both improve in bytes-allocated (by 11% and 13% resp), which is
good.  I'm not sure which of today's short series of patches is
responsible, nor do I mind much.  (One could find out if necessary.)
Revise flattening-notes