Synchronize the cursor returned by followJournal
Synchronize the cursor returned by followJournal

Make sure that the cursor value returned by followJournal() is the last
of the values returned by its goroutine's calls to drainJournal() by
waiting for it, rather than returning a value that may be superceded by
another if we're singalling the goroutine that it should exit by closing
a pipe.

Signed-off-by: Nalin Dahyabhai <f562fcb2a0b898bf0be1afc867ea92325d8f825f@redhat.com>

x1022as/docker,rremer/moby,imkin/moby,hqhq/moby,KarthikNayak/docker,flavio/docker,ibuildthecloud/docker,mahak/docker,rhatdan/docker,jvanz/docker,moul/docker,moypray/docker,rremer/moby,gnailuy/docker,gschaetz/moby,mikebrow/docker,raja-sami-10p/moby,srust/docker,tonistiigi/docker,tophj-ibm/docker,darrenstahlmsft/moby,scotttlin/docker,moby/moby,KarthikNayak/docker,ibuildthecloud/docker,Syntaxide/docker,HideoYamauchi/docker,AkihiroSuda/docker,danyalKhaliq10p/moby,mstanleyjones/docker,ripcurld0/moby,thtanaka/docker,pramodhkp/moby,dims/docker,catinthesky/docker,srust/docker,maxamillion/docker,mike1729/docker,dccurtis/docker,ffoysal/docker,flavio/docker,hqhq/moby,vdemeester/docker,nawawi/docker,gjaskiewicz/moby,gschaetz/moby,sdurrheimer/docker,POLJM242/docker,tklauser/docker,noironetworks/docker,darrenstahlmsft/docker,johnstep/moby-moby,gjaskiewicz/moby,kojiromike/docker,rremer/moby,trebonian/docker,ibuildthecloud/docker,dims/docker,Ramzec/docker,laijs/moby,amatsus/docker,dmcgowan/docker,ndeloof/docker,djs55/docker,jimjag/docker,thaJeztah/docker,konstruktoid/docker-upstream,vdemeester/docker,konstruktoid/docker-1,dsheets/moby,thtanaka/docker,qudongfang/docker,whuwxl/docker,duglin/docker,JMesser81/docker,miminar/docker,paralin/docker,coolljt0725/docker,tophj-ibm/docker,Mokolea/docker,cyphar/docker,pradipd/moby,laijs/docker,diogomonica/docker,cpuguy83/docker,paralin/docker,HideoYamauchi/docker,jimjag/docker,madhanrm/docker,laijs/docker,POLJM242/docker,x1022as/docker,cpuguy83/docker,darrenstahlmsft/docker,cpuguy83/docker,mtesselH/docker,cyphar/docker,PatrickLang/moby,crosbymichael/docker,jwhonce/docker,trebonian/docker,djs55/docker,mixja/docker,jlhawn/docker,erikstmartin/docker,bearstech/moby,maxamillion/docker,ndeloof/docker,dccurtis/docker,jlhawn/docker,noironetworks/docker,JMesser81/docker,dmcgowan/docker,yummypeng/docker,kolyshkin/moby,pradipd/moby,sdurrheimer/docker,coolljt0725/docker,alfred-landrum/docker,moby/moby,jwhonce/docker,AkihiroSuda/docker,rancher/docker,AkihiroSuda/docker,ripcurld0/moby,mike1729/docker,danyalKhaliq10p/moby,konstruktoid/docker-upstream,yasiramin10p/moby,tophj-ibm/moby,lixiaobing1/docker,fcrisciani/docker,yosifkit/docker,ffoysal/docker,sarnautov/moby,tophj-ibm/moby,SvenDowideit/docker,imkin/moby,michael-holzheu/docker,ffoysal/docker,yosifkit/docker,miminar/docker,lixiaobing10051267/docker,ColinHebert/docker,gnailuy/docker,prertik/docker,flavio/docker,coolljt0725/docker,kojiromike/docker,PatrickLang/moby,unclejack/docker,sarnautov/moby,resin-io/docker,pradipd/moby,naveed-jamil-tenpearls/moby,dgageot/docker,gnailuy/docker,PatrickLang/moby,srust/docker,nalind/docker,resin-io/docker,alfred-landrum/docker,YuPengZTE/docker,tmp6154/docker,docker/docker,danyalKhaliq10p/moby,darrenstahlmsft/moby,mstanleyjones/docker,sterchelen/docker,YuPengZTE/docker,tklauser/docker,moul/docker,erikh/docker,KarthikNayak/docker,Mokolea/docker,rancher/docker,justincormack/docker,dgageot/docker,rhatdan/docker,nawawi/docker,kencochrane/docker,raja-sami-10p/moby,konstruktoid/docker-1,jimjag/docker,bonczj/moby-json-file-logger,scotttlin/docker,Ramzec/docker,konstruktoid/docker-1,kojiromike/docker,prertik/docker,lixiaobing1/docker,gschaetz/moby,liaoqingwei/docker,yummypeng/docker,ibuildthecloud/docker,fcrisciani/docker,mstanleyjones/docker,SvenDowideit/docker,Mokolea/docker,moby/moby,allencloud/docker,q384566678/docker,dperny/docker,darrenstahlmsft/docker,dsheets/moby,SvenDowideit/docker,tonistiigi/docker,nawawi/docker,mixja/docker,diogomonica/docker,jthelin/docker,tophj-ibm/moby,charleszheng44/moby,amatsus/docker,catinthesky/docker,docker/docker,paralin/docker,liaoqingwei/docker,nalind/docker,estesp/docker,dperny/docker,yosifkit/docker,pramodhkp/moby,michael-holzheu/docker,moby/moby,dperny/docker,vdemeester/docker,cpuguy83/docker,mkumatag/docker,mkumatag/docker,madhanrm/docker,jwhonce/docker,shishir-a412ed/docker,yasiramin10p/moby,diogomonica/docker,bearstech/moby,mahak/docker,laijs/moby,nawawi/docker,yongtang/docker,mahak/docker,sterchelen/docker,sdurrheimer/docker,erikstmartin/docker,yummypeng/docker,KingEmet/docker,darrenstahlmsft/moby,prertik/docker,unclejack/docker,q384566678/docker,qudongfang/docker,sarnautov/moby,nalind/docker,haveatry/docker,moypray/docker,imkin/moby,akira-baruah/docker,shhsu/docker,mikebrow/docker,yasiramin10p/moby,michael-holzheu/docker,miminar/docker,thaJeztah/docker,mike1729/docker,tmp6154/docker,moul/docker,coreos/docker,djs55/docker,shhsu/docker,dsheets/moby,erikh/docker,charleszheng44/moby,haveatry/docker,jthelin/docker,whuwxl/docker,yongtang/docker,flavio/docker,duglin/docker,JMesser81/docker,justincormack/docker,qudongfang/docker,mikebrow/docker,rhatdan/docker,lixiaobing10051267/docker,pramodhkp/moby,estesp/docker,lixiaobing10051267/docker,madhanrm/docker,liaoqingwei/docker,shishir-a412ed/docker,jlhawn/docker,alfred-landrum/docker,kolyshkin/moby,tianon/docker,erikstmartin/docker,nalind/docker,konstruktoid/docker-upstream,yosifkit/docker,shishir-a412ed/docker,jameszhan/docker,catinthesky/docker,tophj-ibm/docker,naveed-jamil-tenpearls/moby,justincormack/docker,bearstech/moby,bearstech/moby,akira-baruah/docker,tianon/docker,x1022as/docker,jameszhan/docker,paralin/docker,ndeloof/docker,yongtang/docker,Mokolea/docker,dgageot/docker,shhsu/docker,rancher/docker,allencloud/docker,trebonian/docker,noironetworks/docker,unclejack/docker,laijs/docker,AkihiroSuda/docker,Ramzec/docker,thaJeztah/docker,Syntaxide/docker,trebonian/docker,Syntaxide/docker,KingEmet/docker,ibuildthecloud/docker,tklauser/docker,laijs/moby,amatsus/docker,haveatry/docker,gnailuy/docker,konstruktoid/docker-upstream,fcrisciani/docker,bonczj/moby-json-file-logger,KingEmet/docker,hqhq/moby,mtesselH/docker,moul/docker,crosbymichael/docker,kencochrane/docker,tonistiigi/docker,mixja/docker,docker/docker,maxamillion/docker,mkumatag/docker,ColinHebert/docker,Ramzec/docker,coreos/docker,mtesselH/docker,johnstep/moby-moby,kolyshkin/moby,mahak/docker,ripcurld0/moby,HideoYamauchi/docker,thtanaka/docker,resin-io/docker,charleszheng44/moby,bonczj/moby-json-file-logger,allencloud/docker,kolyshkin/docker,dims/docker,erikh/docker,crosbymichael/docker,jvanz/docker,cyphar/docker,YuPengZTE/docker,thaJeztah/docker,jvanz/docker,johnstep/moby-moby,kolyshkin/docker,raja-sami-10p/moby,whuwxl/docker,ColinHebert/docker,jameszhan/docker,q384566678/docker,coreos/docker,dccurtis/docker,scotttlin/docker,estesp/docker,tmp6154/docker,dmcgowan/docker,jimjag/docker,naveed-jamil-tenpearls/moby,xuxinkun/docker,kencochrane/docker,lixiaobing1/docker,gjaskiewicz/moby,sterchelen/docker,xuxinkun/docker,duglin/docker,moypray/docker,xuxinkun/docker