Avoid locking in BIO_get_port() by using getservbyname_r() instead of
getservbyname(). While here, provide a common/single return path.

ok deraadt@