fix type checking and cleanup type errors

Summary:
Fixed nested lambda type checking; previously it double-checked lambdas
in the wrong context; now we only check them once

Lots of little extra variables added to satisfy the type checker

test plan: make compiler && make clean && make test
compiler update
Fix type-checking inside lambdas

Previously type-checking was mostly ignoring inner lambdas more
than one level deep. This should fix some of that. At the very
least, test.al is now giving a reasonable compilation error

Test plan: make && node parsetest.js