Add a goroutine to ensure synchronization of access to connection.

The hope was that the corruption of the connection was occurring because
of race conditions between different goroutines accessing
the same file descriptor.

However, even with this change:

	docker run busybox sh -c 'echo 01234; sleep 1; echo 56789; sleep 1; echo 01234'

sometimes prints 01234\n and sometimes prints 01234\n\t57689\n
however it never prints 01234\n56789\n\01234\n

indicating that it is the mere fact that the CloseWrite call is made that
is significant. It appears any bytes received prior to the CloseWrite call, but not
acknowledged will never be properly acknowledged.

The problem only appears to affect the Docker OSX client talking to Docker server
via port forwarded from the loopback interface.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>