Add support for passing LocalDefs through chains.

So that it becomes possible to inline a closure used two
levels of inlining (or more) from where it is declared.
Handle This() more like VarRef() in the optimizer.
Merge pull request #838 from sjrd/better-val-aliasing

Better val and this aliasing