Case-of triggers (need more testing)

Not sure they really work, only tested on
a simple example.
Rewrote correctness checker in foestus/agda style

Hopefully it is "more" correct. At least this fixes
some incorrect examples which used to pass the check,
and there are (almost) no regressions for any useful examples.
It also doesn't seem to be much slower, it even makes the example
church-pred pass for some reason.

Also deleted a lot of useless residuational stuff that used
the old checker and which I don't want to fix.