Improved let clauses

Let clauses now literally replace identifiers instead of being
syntactic sugar for lambda-apply expressions. This is necessary
for type checking in some cases.