async_wrap: fix memory leak in AsyncResource
Reset the persistent that keeps the resource Object alive when the AsyncResource is being destroyed.
Fixes: https://github.com/nodejs/node-addon-api/issues/237
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines