tls_wrap: use localhost if options.host is empty
That's my PR for #1489 (closed). Thanks @Fishrock123 for the actual fix idea
cc: @silverwind @Fishrock123
tls.connect(options) with no options.host should accept a certificate
with CN: 'localhost'. Fix Error: Hostname/IP doesn't match
certificate's altnames: "Host: undefined. is not cert's CN: localhost"
'localhost' is not added directly to defaults because that is not
always desired (for example, when using options.socket)
This is my first PR here, I would really appreciate a careful review ;)