tls: improve performance of getAllowUnauthorized
Improves the performance of getAllowUnauthorized. It is called on every call of tls connect.
before:
aras@aras-Lenovo-Legion-5-17ARH05H:~/workspace/node$ node ./benchmark/tls/get-allow-unauthorized.js
tls/get-allow-unauthorized.js n=16777216: 4,760,304.7689979095
after:
aras@aras-Lenovo-Legion-5-17ARH05H:~/workspace/node$ ./node ./benchmark/tls/get-allow-unauthorized.js
tls/get-allow-unauthorized.js n=16777216: 169,041,177.4754851