Fix unfiled bug that could break TCP tests under some circumstances.

The bug and solution are very similar to Issue 126 (fixed in
d7e0c1445c0a).  Basically a setsockopt(IPV6_V6ONLY) call had a bogus
level argument, but we never checked the return value so we never
noticed this.

As with the prior issue, the fix is to unbreak the setsockopt() call,
and add some error checking to detect future breakage.

This bug was on a codepath that only got called if non-default values
were set for the socket buffer size, the MSS, or the NODELAY parameter.
It might have affected some FreeBSD tests, but really only got noticed
when debugging some other code that was (probably) cut-and-pasted
from this code.

(cherry picked from commit 4addea850295d28afff630cb436000f0cb8988c0)
Signed-off-by: Bruce A. Mah <bmah@es.net>

Conflicts:
	src/iperf_api.h
	src/iperf_error.c