Check GC loop is active/necessary before triggering GC
Check GC loop is active/necessary before triggering GC

Calling GC() without ever creating a network namespace (sandbox on
Linux) will hang as the GC loop is not running (and therefore the
channel is not being listened to).

Tested via Docker that this corrects a daemon shutdown error if the
daemon is started and stopped without any containers or networks being
created while the daemon is up.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>

kolyshkin/libnetwork,fcrisciani/libnetwork,curtiszimmerman/libnetwork,mavenugo/libnetwork,mYmNeo/libnetwork,wcwxyz/libnetwork,tgraf/libnetwork,allencloud/libnetwork,medallia/libnetwork,carlye566/libnetwork,sainath14/libnetwork,docker/libnetwork,anortef/libnetwork,minhoryang/libnetwork,abhi/libnetwork,tmakita/libnetwork,ycaihua/libnetwork,vdemeester/libnetwork,sharmasushant/libnetwork,runcom/libnetwork,junxu/libnetwork,mavenugo/libnetwork,fcrisciani/libnetwork,chenchun/libnetwork,dcbw/libnetwork,rogaha/libnetwork,argvader/libnetwork,jimmycmh/libnetwork,mountkin/libnetwork,mahak/libnetwork,axsh/libnetwork,AdoHe/libnetwork,brahmaroutu/libnetwork,brahmaroutu/libnetwork,hackersdotmu/libnetwork,clnperez/libnetwork,ycaihua/libnetwork,medallia/libnetwork,docker/libnetwork,mapuri/libnetwork,axsh/libnetwork,junxu/libnetwork,kvasdopil/libnetwork,hw-qiaolei/libnetwork,WeiZhang555/libnetwork,sainath14/libnetwork,ityangchen/libnetwork,mbanikazemi/libnetwork,amitkris/libnetwork,runcom/libnetwork,anshulr/libnetwork,lindenlab/libnetwork,sanimej/libnetwork,mountkin/libnetwork,aboch/libnetwork_new,anshulr/libnetwork,curtiszimmerman/libnetwork,tangkun75/libnetwork,brewertribe/libnetwork,carlye566/libnetwork,anortef/libnetwork,cpuguy83/libnetwork,msabansal/libnetwork,djones-skytap/libnetwork,cloudflare/libnetwork,pyakpyak/libnetwork,abhi/libnetwork,cpuguy83/libnetwork,AdoHe/libnetwork,ityangchen/libnetwork,kunalkushwaha/libnetwork,kolyshkin/libnetwork,kunalkushwaha/libnetwork,kvasdopil/libnetwork,coolljt0725/libnetwork,YujiOshima/libnetwork,msagheer/libnetwork,tmakita/libnetwork,clnperez/libnetwork,tgraf/libnetwork,anarcher/libnetwork,abronan/libnetwork,anarcher/libnetwork,docker/libnetwork,bprashanth/libnetwork,coolljt0725/libnetwork,thockin/libnetwork,dcbw/libnetwork,minhoryang/libnetwork,pyakpyak/libnetwork,wcwxyz/libnetwork,jmzwcn/libnetwork,mahak/libnetwork,calavera/libnetwork,wulonghui/libnetwork,wulonghui/libnetwork,chenchun/libnetwork,hackersdotmu/libnetwork,jvinod/libnetwork,tangkun75/libnetwork,carlye566/libnetwork_eric,sanimej/libnetwork,vdemeester/libnetwork,jvinod/libnetwork,brewertribe/libnetwork,medallia/libnetwork,calavera/libnetwork,allencloud/libnetwork,vijayendrabvs/libnetwork,YujiOshima/libnetwork,sharmasushant/libnetwork,msagheer/libnetwork,mbanikazemi/libnetwork,lindenlab/libnetwork,msabansal/libnetwork,djones-skytap/libnetwork,amitkris/libnetwork,carlye566/libnetwork_eric,mapuri/libnetwork,aboch/libnetwork_new,cloudflare/libnetwork,abhi/libnetwork,frntn/libnetwork,argvader/libnetwork,abronan/libnetwork,jmzwcn/libnetwork,rogaha/libnetwork,mahak/libnetwork,bprashanth/libnetwork,thockin/libnetwork,hw-qiaolei/libnetwork,kolyshkin/libnetwork,frntn/libnetwork,vijayendrabvs/libnetwork,WeiZhang555/libnetwork,mYmNeo/libnetwork,vdemeester/libnetwork,jimmycmh/libnetwork