dns: use length for building TXT string
Rely on the length reported by C-Ares rather than \0
-termination
for creating the JS string for a dns TXT response.
Fixes: https://github.com/nodejs/node/issues/30688
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines