src: use single ObjectTemplate for TextDecoder
ObjectTemplate
s are not garbage-collected like regular objects
(for some reason). It is sufficient to create a single template
anyway, so do that to address the memory leak.
Fixes: https://github.com/nodejs/node/issues/32424
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines