Use of @convention(thin) to avoid allocating closures

@convention(thin) is not officially supported yet and may cause compiler crashes if not used in the narrow circumstances it happens to work by accident today. If a closure truly closes over no state, its context pointer should be null, and retain/release operations should early-exit on it. There'll be some code size and branching overhead from this, but shouldn't be any atomic memory access overhead, at least. If your signatures happen to be C-compatible, you might be able to use @convention(c) instead, which is more completely implemented.