First pass at closures.

There is a lot of cleanup to do, but they seem to pretty much work.
Notable missing features include:
- No refcounting for closures, so they're just leaking all over the
  place.
- Not nearly enough tests.
- Everything needs cleaned up, and we should be able to get rid of a
  bunch of special-case code now (particularly member function
  invocation, distinction of global as a closed environment).

static.cpp has changed to compute closure structures (and not complain
about enclosing scopes).
irgen.cpp has changed to create closure structures, pass them around
instead of global data structure pointers, and manage a bunch of
metadata for name lookup in the various scopes.