Fix bug in Form element updates in which switching to a different type of Element caused a runtime error.
Update Optimize.hs to use some of the newer infix operators.
Add type-class for lists in LetBoundVars.hs
Switch back to putting let and case expressions in closures.

In the former case it is actually necessary, in the latter, it partially fixes a mysterious bug with Dict.diff.

Also stop using the LetBoundVars module.
Fix missing `var` problem.