Decrement epCnt only after all cleanup
Decrement epCnt only after all cleanup

Currently the endpoint count is being decremented before the driver
cleanup and more importantly before releasing the ip address. This is
racy as it creates a time window where we already have decremented the
endpoint count and so the network can be deleted now. But we haven't
released the IP address yet and the pool is already gone. Although there
is no harm done since the pool is already gone. it generates unnecessary
error message about not able to release the address. Also if the driver
cleanup fails we really should not decrement endpoint count.

Signed-off-by: Jana Radhakrishnan <045898bda7d4800fe4909a9831e702ab79e266be@docker.com>

trebonian/docker,AkihiroSuda/docker,vdemeester/docker,Mokolea/docker,Ramzec/docker,Mokolea/docker,nalind/docker,gnailuy/docker,docker/docker,moul/docker,jimjag/docker,flavio/docker,cpuguy83/docker,moul/docker,AkihiroSuda/docker,bearstech/moby,mahak/docker,djs55/docker,cpuguy83/docker,yosifkit/docker,bearstech/moby,moby/moby,trebonian/docker,AkihiroSuda/docker,nalind/docker,vdemeester/docker,cpuguy83/docker,konstruktoid/docker-upstream,paralin/docker,Ramzec/docker,mahak/docker,nawawi/docker,vdemeester/docker,nawawi/docker,paralin/docker,gnailuy/docker,moby/moby,mahak/docker,nawawi/docker,jameszhan/docker,konstruktoid/docker-upstream,paralin/docker,moul/docker,moby/moby,thaJeztah/docker,moby/moby,konstruktoid/docker-upstream,mahak/docker,bearstech/moby,flavio/docker,AkihiroSuda/docker,yosifkit/docker,paralin/docker,docker/docker,nalind/docker,yosifkit/docker,flavio/docker,konstruktoid/docker-upstream,thaJeztah/docker,bearstech/moby,docker/docker,nalind/docker,moul/docker,jimjag/docker,Mokolea/docker,gnailuy/docker,yosifkit/docker,jthelin/docker,trebonian/docker,jimjag/docker,jameszhan/docker,thaJeztah/docker,flavio/docker,djs55/docker,djs55/docker,jimjag/docker,Ramzec/docker,Ramzec/docker,nawawi/docker,Mokolea/docker,cpuguy83/docker,trebonian/docker,thaJeztah/docker,jameszhan/docker,gnailuy/docker,jthelin/docker