Add staticEff/toEff

Sometimes when working with effectful programs which change state, you
need to give the intermediate effect state explicitly, which can be
inconvenient with (>>=) especially, so these functions make it easier.

toEff is especially useful with 'case' blocks which branch the effects then
rejoin after.
New matching rule for solving simple functions

This applies only at the end of unification: if a constant function
returning a constructor form would solve a metavariable, fill it in.