fix(ext/node): FileHandle compatibility (#31164)
Towards #29972
Tries to reland #31094 that got reverted on #31103 due to CI test
failures. This PR differs by fixing the `[kUnref]` method to close
resource ID correctly.
Allows the following tests to pass:
-
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-filehandle-close.js
-
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-filehandle-use-after-close.js
---------
Signed-off-by: Daniel Osvaldo Rahmanto <daniel.rahmanto@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>