Fix blatant memory trample.
Fix for uninitialized pointer free in SocketConnect().

As pointed out by @worr in #1918, failure of getaddrinfo() may leave
response2 unset, in which case calling freeaddrinfo() on it is apt to
crash.  None the less, nothing guarantees that failing getaddrinfo()
won't set the response list (e.g. when OOM prevents it allocating
space for further entries).  So initialise it to NULL.

Also move the declaration closer to its use.
Protect against freeaddrinfo(NULL);

Apparently some implementations don't handle this gracefully.
/me bangs head on wall, but is glad I googled.
Fix another addrinfo corner case in SocketConnect().

The initial call to getaddrinfo() is subject to the same concerns as
the secondary one, as noticed by @jimis in code review.
Merge pull request #1919 from ediosyncratic/trample-fix

Fix a memory trample and some bad freeaddrinfo() calls.
Improve test case for ifvarclass with functions

As per feedback to ediosyncratic, make sure we test the positive
case as well, and use standard "ok" class to mark pass/fail.
Merge pull request #1928 from vohi/master

Improve test case for ifvarclass with functions
Fix acceptance tests on Solaris 9 SPARC.