Add missing kind-check for tcEqType on forall-types

This wasn't showing up as a bug, but it was definitely wrong.

(cherry picked from commit 74894e0bc405247092e865b9541f5f18d26aa015)
relnotes: GND is not -XSafe compatible.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 73cab206e0f211b75cb6fd62ab9b6ca8ae0950f2)
Implicit parameters should not be allowed in class and instance declarations

Trac #8912 pointed out that GHC 7.4 and 7.6 have omitted this test, although
7.2 and earlier had it.  This patch puts the test back in, and refactors a
little.

(cherry picked from commit a8b7b28cdb98d14c6fb43d5ad3293fd4a5c1f8b4)

Conflicts:
	testsuite/tests/typecheck/should_fail/all.T
For equalities with incompatible kinds, new IrredCan goes in the inert set, not work list

This change makes the code for canIrred markedly simpler (and more efficient)
See Note [Equalities with incompatible kinds].

I don't think there was really a bug here, but I came across it when
fixing Trac #8913

(cherry picked from commit c89c57e3b72a8f3de9f35e1bd6e0f70d2b18a941)
Flattener preserves synonyms, rewriteEvidence can drop buggy "optimisation"

There was a special case in rewriteEvidence, looking like:
  = return (Just (if ctEvPred old_ev `tcEqType` new_pred
                  then old_ev
                  else old_ev { ctev_pred = new_pred }))

But this was wrong: old_pred and new_pred might differ in the kind
of a TyVar occurrence, in which case tcEqType would not notice,
but we really, really want new_pred.  This caused Trac #8913.

I solved this by dropping the whole test, and instead making
the flattener preserve type synonyms. This was easy because
TcEvidence has TcTyConAppCo which (unlike) Coercion, handles
synonyms.

(cherry picked from commit 6ae678e31a5fdd3b0bd1f8613fe164012bb630f4)