codegen: implement unboxing functions; passing works!

Note that we can only pass around functions of single arguments now.