Fix #1175: Tighten the definition of Closure nodes.

Captures can have any type, but must always be immutable.

Parameters, and the `this` parameter, must always be of type `AnyType`, and the result type must be `AnyType` as well. Parameters can be mutable.
Shouldn't this go into a separate commit for bisecting's sake? IMHO this change is a-priori unrelated to the simplification of the closure tree. (It can be the same PR though).