Emit Closure nodes in the compiler instead of Functions.

Follow up on the parent commit, now the compiler emits the
new Closure nodes instead of Functions.