connect: Close open but unconnected socket in singleipconnect()

singleipconnect() could return the file descriptor of an open socket
even though the function returned a CURLE_COULDNT_CONNECT error code
from commit ed1662c374361a and 02fbc26d59c591.

This could cause tests 19, 704 and 1233 to fail on FreeBSD, AIX and
Solaris.