Normalise pattern types when typechecking

Otherwise the erasure of collapsible variables doesn't necessarily spot
them on the right hand side, and we can't normalise there because we
don't have the right context information and forcing has already
happened.

Fixes #596
Set up more partial evaluation machinery

elabPE in ElabDecls now searches for partially evaluatable names (by
searching for statics), creates a new definition and elaborates and
specialises that (so recursively finding any more partially evaluatable
names).

Not finished yet, so call to elabPE is commented out for now.