cmd/dockerd: reserve port before creating sockets/listeners
cmd/dockerd: reserve port before creating sockets/listeners

This prevents creating a socket and touching the filesystem before
trying to use a port that was already in use by a container.

Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>

nawawi/docker,Ramzec/docker,konstruktoid/docker-upstream,thaJeztah/docker,cpuguy83/docker,thaJeztah/docker,nawawi/docker,thaJeztah/docker,moul/docker,mahak/docker,moby/moby,moby/moby,jimjag/docker,konstruktoid/docker-upstream,trebonian/docker,Ramzec/docker,jimjag/docker,Mokolea/docker,nawawi/docker,thaJeztah/docker,mahak/docker,Mokolea/docker,Mokolea/docker,jimjag/docker,trebonian/docker,cpuguy83/docker,moby/moby,konstruktoid/docker-upstream,moul/docker,nawawi/docker,cpuguy83/docker,trebonian/docker,jimjag/docker,moul/docker,konstruktoid/docker-upstream,moul/docker,mahak/docker,trebonian/docker,moby/moby,Mokolea/docker,mahak/docker,Ramzec/docker,Ramzec/docker,cpuguy83/docker