Fix a bug where the socket wasn't being correctly destroyed and
adjust existing tests, as well as add additional tests.
PR-URL: https://github.com/nodejs/node/pull/19852
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Co-authored-by: Matteo Collina <matteo.collina@gmail.com>