Clean up of socket code.

Let socket_create take struct addrinfo as argument and use the entries of
addrinfo to create the socket.

Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1395407925-25518-11-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8370

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Fix assert when using port-share

Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1395407925-25518-12-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8369

Signed-off-by: Gert Doering <gert@greenie.muc.de>