Initial support for closure codegen
This MR adds initial support for closures. This includes specifying closures, generating their code, and checking their specifications.
This does not yet include actually calling closures or taking closures as function arguments.