Improve trimming of auto-rules

I hadn't got the new function trimAutoRules quite right, so we had
a left-over rule which mentioned a local variable whose binding had
been discarded.  (Result: crash when compiling Haddock.)

This patch merges trimAutoRules into an expanded version of
findExternalRules, gets it right, and adds lots of comments.

See Note [Finding external rules].

And indeed in one regression test we get to trim off more rules
(and hence code) than before.
Fix syntax in perf/compiler/all.T
White space only
Better compiler performance (30% less allocation) for T783!
Define mapUnionVarSet, and use it

Call sites are much easier to understand than before
Rename red-black test in indexed-types to red-black-delete
In GHC.Real, specialise 'even' and 'odd' to Int and Integer

This was previously happening by a fluke -- they were called with those types
in GHC.Real itself -- but my recent changes to specialisation mean that auto
specialisations like these are not necessarily exported.

Losing those specialisations made a huge difference to two performance tests
   perf/should_run/MethSharing
   perf/should_run/T9339
Improve "specImport discarding" message
Testsuite wibbles