N-API: Some issues with the new async cleanup hooks

At

node/src/node_api.h

Line 257 in bcfb176

void (*fun)(void* arg, void(* cb)(void*), void* cbarg),

cbarg is a pointer passing from the core into the add-on. The core expects that it will be passed back into the core as the first parameter to cb. There is no guarantee that add-on authors will faithfully pass it back as expected.

We should create a wrapper that retains cbarg in the implementation, making it possible to give a function `void (*cb)() to the add-on.