make listen buffer optional

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
move acceptconnections as builtin

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Merge pull request #5571 from vieux/fix_race_docker_daemon

Fix race docker daemon
integcli: resolve full path to docker binary

Setting dockerBinary to the full path of the Docker binary is a good
idea and this is now done in the test code.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
add ValidateContextDirectory to utils/utils.go

This commit adds a function which can be used to ensure all contents of
a directory can be accessed.

This function doesn't follow symlinks to check if they're pointing to
files which exist. Such symlinks can be useful later.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
use ValidateContextDirectory to validate context

This commit makes the Docker cli client use ValidateContextDirectory
before attempting to create a tarball out of the context. This ensures
we avoid errors such as "unexpected EOF" during the upload of the
context.

This check is done before uploading any data and can save time and
bandwidth for remote Docker daemons.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
add test for issue #5270

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)