agentSetup to first check if clusterProvider is nil
agentSetup to first check if clusterProvider is nil

- concurrent swarm join and daemon stop seen in
  integration tests may cause agentSetup to access
  a nil clusterProvider, resulting in a panic

Signed-off-by: Alessandro Boch <5bd2eb5b6f60921d9a2b9cb6a0a86bb947f3d361@docker.com>

allencloud/libnetwork,docker/libnetwork,abhi/libnetwork,mahak/libnetwork,medallia/libnetwork,fcrisciani/libnetwork,docker/libnetwork,ityangchen/libnetwork,abhi/libnetwork,medallia/libnetwork,docker/libnetwork,mahak/libnetwork,kolyshkin/libnetwork,kolyshkin/libnetwork,allencloud/libnetwork,WeiZhang555/libnetwork,vdemeester/libnetwork,vdemeester/libnetwork,fcrisciani/libnetwork,medallia/libnetwork,ityangchen/libnetwork,kolyshkin/libnetwork,vdemeester/libnetwork,WeiZhang555/libnetwork,abhi/libnetwork,mahak/libnetwork