WIP still fixing up [v10.x backport] n-api: handle reference delete before finalize
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Original PR: https://github.com/nodejs/node/pull/24494