podlogs: avoid dumping a terminated container more than once
podlogs: avoid dumping a terminated container more than once

The original logic was that dumping can stop (for example, due to
loosing the connection to the apiserver) and then will start again as
long as the container exists. That it duplicates output on restarts
is better than skipping output that might not have been dumped yet.

But that logic then also dumped the output of containers that have
terminated multiple times:
- logging is started, dumps all output and stops because the
  container has terminated
- next check finds the container again, sees no active logger,
  repeats

This wasn't a problem for short-lived logging in a custom
namespace (the way how it is done for CSI drivers in Kubernetes E2E),
but other testsuites (like the one from PMEM-CSI) keep logging running
for the entire test suite duration: there duplicate output became a
problem when adding driver redeployment as part of the suite's run.

To avoid duplicated output for terminated containers, which containers
have been handled is now stored permanently. For terminated containers,
restarting of dumping is prevented. This comes with the risk that if
the previous dumping ended before capturing all output, some output
will get lost.

Marking the start and stop of the log was also useful when streaming
to a single writer and thus gets enabled.

ravilr/kubernetes,coolsvap/kubernetes,kubernetes/kubernetes,spzala/kubernetes,jdef/kubernetes,dixudx/kubernetes,li-ang/kubernetes,tcnghia/kubernetes,sethpollack/kubernetes,olivierlemasle/kubernetes,verb/kubernetes,zetaab/kubernetes,fanzhangio/kubernetes,maciaszczykm/kubernetes,du2016/kubernetes,sanjeevm0/kubernetes,zhangmingld/kubernetes,GulajavaMinistudio/kubernetes,verb/kubernetes,sanjeevm0/kubernetes,feiskyer/kubernetes,kitt1987/kubernetes,fanzhangio/kubernetes,idvoretskyi/kubernetes,carlory/kubernetes,coolsvap/kubernetes,fabriziopandini/kubernetes,csrwng/kubernetes,PI-Victor/kubernetes,stevesloka/kubernetes,monopole/kubernetes,huangjiuyuan/kubernetes,mikedanese/kubernetes,tallclair/kubernetes,dereknex/kubernetes,ravisantoshgudimetla/kubernetes,GulajavaMinistudio/kubernetes,dixudx/kubernetes,sdminonne/kubernetes,kevensen/kubernetes,andrewrynhard/kubernetes,k82cn/kubernetes,rrati/kubernetes,kpgriffith/kubernetes,spzala/kubernetes,andrewsykim/kubernetes,gnufied/kubernetes,kpgriffith/kubernetes,zetaab/kubernetes,ii/kubernetes,fejta/kubernetes,yujuhong/kubernetes,iameli/kubernetes,thockin/kubernetes,roberthbailey/kubernetes,xlgao-zju/kubernetes,jessfraz/kubernetes,dlorenc/kubernetes,kevin-wangzefeng/kubernetes,GulajavaMinistudio/kubernetes,chestack/kubernetes,mahak/kubernetes,iameli/kubernetes,MikeSpreitzer/kubernetes,sanjeevm0/kubernetes,ii/kubernetes,mikedanese/kubernetes,fabriziopandini/kubernetes,tomzhang/kubernetes,pires/kubernetes,humblec/kubernetes,verult/kubernetes,tengqm/kubernetes,ixdy/kubernetes,fgimenez/kubernetes,tomerf/kubernetes,MikeSpreitzer/kubernetes,Clarifai/kubernetes,jackfrancis/kubernetes,mengqiy/kubernetes,jessfraz/kubernetes,rnaveiras/kubernetes,MikeSpreitzer/kubernetes,rnaveiras/kubernetes,shyamjvs/kubernetes,PI-Victor/kubernetes,enj/kubernetes,csrwng/kubernetes,tengqm/kubernetes,PI-Victor/kubernetes,iterion/kubernetes,soltysh/kubernetes,klaus1982/kubernetes,fanzhangio/kubernetes,tcnghia/kubernetes,nckturner/kubernetes,zhangmingld/kubernetes,tallclair/kubernetes,jdef/kubernetes,fgimenez/kubernetes,andrewsykim/kubernetes,rrati/kubernetes,huangjiuyuan/kubernetes,wongma7/kubernetes,MHBauer/kubernetes,gnufied/kubernetes,verult/kubernetes,liggitt/kubernetes,Clarifai/kubernetes,deads2k/kubernetes,feiskyer/kubernetes,soltysh/kubernetes,dereknex/kubernetes,yarntime/kubernetes,wanghaoran1988/kubernetes,gnufied/kubernetes,ravisantoshgudimetla/kubernetes,rnaveiras/kubernetes,mikebrow/kubernetes,openshift/kubernetes,nikhita/kubernetes,aledbf/kubernetes,tallclair/kubernetes,bparees/kubernetes,iameli/kubernetes,micahhausler/kubernetes,mYmNeo/kubernetes,klaus1982/kubernetes,nak3/kubernetes,jingxu97/kubernetes,jagosan/kubernetes,mikebrow/kubernetes,kitt1987/kubernetes,iameli/kubernetes,andrewrynhard/kubernetes,rrati/kubernetes,mahak/kubernetes,Acidburn0zzz/kubernetes,ingvagabund/kubernetes,lojies/kubernetes,sethpollack/kubernetes,matthyx/kubernetes,hex108/kubernetes,ravisantoshgudimetla/kubernetes,verult/kubernetes,tomzhang/kubernetes,xychu/kubernetes,dlorenc/kubernetes,mengqiy/kubernetes,cmluciano/kubernetes,tcnghia/kubernetes,micahhausler/kubernetes,nikhita/kubernetes,BenTheElder/kubernetes,chrislovecnm/kubernetes,roberthbailey/kubernetes,tomerf/kubernetes,bparees/kubernetes,ravilr/kubernetes,kpgriffith/kubernetes,ping035627/kubernetes,iterion/kubernetes,PI-Victor/kubernetes,chestack/kubernetes,rafax/kubernetes,mfojtik/kubernetes,dlorenc/kubernetes,tomzhang/kubernetes,ingvagabund/kubernetes,stevesloka/kubernetes,dims/kubernetes,jessfraz/kubernetes,liggitt/kubernetes,roberthbailey/kubernetes,sdminonne/kubernetes,wongma7/kubernetes,tcnghia/kubernetes,sanjeevm0/kubernetes,chestack/kubernetes,zhouhaibing089/kubernetes,enj/kubernetes,klaus1982/kubernetes,coolsvap/kubernetes,nckturner/kubernetes,Lion-Wei/kubernetes,mikedanese/kubernetes,liggitt/kubernetes,yarntime/kubernetes,Lion-Wei/kubernetes,du2016/kubernetes,csrwng/kubernetes,ixdy/kubernetes,mkumatag/kubernetes,ii/kubernetes,roberthbailey/kubernetes,alejandroEsc/kubernetes,tpepper/kubernetes,luxas/kubernetes,johscheuer/kubernetes,jagosan/kubernetes,spzala/kubernetes,joelsmith/kubernetes,MHBauer/kubernetes,JacobTanenbaum/kubernetes,fabriziopandini/kubernetes,zhouhaibing089/kubernetes,dereknex/kubernetes,jagosan/kubernetes,x13n/kubernetes,csrwng/kubernetes,stevesloka/kubernetes,MHBauer/kubernetes,wongma7/kubernetes,mosoft521/kubernetes,erwinvaneyk/kubernetes,sdminonne/kubernetes,krmayankk/kubernetes,x13n/kubernetes,thockin/kubernetes,warmchang/kubernetes,BenTheElder/kubernetes,micahhausler/kubernetes,ingvagabund/kubernetes,BenTheElder/kubernetes,andrewrynhard/kubernetes,verb/kubernetes,thockin/kubernetes,zhangmingld/kubernetes,cofyc/kubernetes,wanghaoran1988/kubernetes,rnaveiras/kubernetes,saad-ali/kubernetes,thockin/kubernetes,soltysh/kubernetes,k82cn/kubernetes,shyamjvs/kubernetes,krmayankk/kubernetes,ixdy/kubernetes,BenTheElder/kubernetes,mkumatag/kubernetes,k82/kubernetes,hex108/kubernetes,deads2k/kubernetes,monopole/kubernetes,GulajavaMinistudio/kubernetes,dereknex/kubernetes,GulajavaMinistudio/kubernetes,tpepper/kubernetes,tomzhang/kubernetes,sethpollack/kubernetes,wanghaoran1988/kubernetes,mikebrow/kubernetes,huangjiuyuan/kubernetes,aledbf/kubernetes,k82/kubernetes,Lion-Wei/kubernetes,micahhausler/kubernetes,gnufied/kubernetes,idvoretskyi/kubernetes,PiotrProkop/kubernetes,kitt1987/kubernetes,rafax/kubernetes,Lion-Wei/kubernetes,jsafrane/kubernetes,joelsmith/kubernetes,luxas/kubernetes,PiotrProkop/kubernetes,kubernetes/kubernetes,mikebrow/kubernetes,coolsvap/kubernetes,ravisantoshgudimetla/kubernetes,idvoretskyi/kubernetes,zhouhaibing089/kubernetes,andrewsykim/kubernetes,dereknex/kubernetes,dlorenc/kubernetes,stevesloka/kubernetes,dlorenc/kubernetes,kevin-wangzefeng/kubernetes,fanzhangio/kubernetes,mengqiy/kubernetes,jingxu97/kubernetes,mYmNeo/kubernetes,MikeSpreitzer/kubernetes,li-ang/kubernetes,erwinvaneyk/kubernetes,humblec/kubernetes,ravilr/kubernetes,jdef/kubernetes,fanzhangio/kubernetes,carlory/kubernetes,erwinvaneyk/kubernetes,chrislovecnm/kubernetes,mosoft521/kubernetes,fgimenez/kubernetes,sethpollack/kubernetes,mikedanese/kubernetes,olivierlemasle/kubernetes,cblecker/kubernetes,matthyx/kubernetes,maciaszczykm/kubernetes,PiotrProkop/kubernetes,rrati/kubernetes,hex108/kubernetes,Lion-Wei/kubernetes,luxas/kubernetes,dixudx/kubernetes,joelsmith/kubernetes,andrewrynhard/kubernetes,ping035627/kubernetes,yujuhong/kubernetes,chrislovecnm/kubernetes,ii/kubernetes,xychu/kubernetes,jsafrane/kubernetes,yujuhong/kubernetes,cmluciano/kubernetes,x13n/kubernetes,idvoretskyi/kubernetes,chestack/kubernetes,andrewsykim/kubernetes,carlory/kubernetes,xlgao-zju/kubernetes,warmchang/kubernetes,zhouhaibing089/kubernetes,cmluciano/kubernetes,mahak/kubernetes,k82cn/kubernetes,johscheuer/kubernetes,cblecker/kubernetes,fabriziopandini/kubernetes,ravisantoshgudimetla/kubernetes,jingxu97/kubernetes,du2016/kubernetes,micahhausler/kubernetes,fgimenez/kubernetes,cofyc/kubernetes,Acidburn0zzz/kubernetes,alejandroEsc/kubernetes,brendandburns/kubernetes,weiwei04/kubernetes,weiwei04/kubernetes,yarntime/kubernetes,tengqm/kubernetes,feiskyer/kubernetes,linux-on-ibm-z/kubernetes,x13n/kubernetes,tomzhang/kubernetes,humblec/kubernetes,mfojtik/kubernetes,JacobTanenbaum/kubernetes,nckturner/kubernetes,nikhita/kubernetes,sdminonne/kubernetes,kubernetes/kubernetes,nak3/kubernetes,kitt1987/kubernetes,kitt1987/kubernetes,warmchang/kubernetes,tallclair/kubernetes,deads2k/kubernetes,enj/kubernetes,nak3/kubernetes,liggitt/kubernetes,brendandburns/kubernetes,linux-on-ibm-z/kubernetes,mYmNeo/kubernetes,openshift/kubernetes,jdef/kubernetes,rafax/kubernetes,liggitt/kubernetes,tomzhang/kubernetes,fgimenez/kubernetes,yujuhong/kubernetes,brendandburns/kubernetes,dims/kubernetes,PiotrProkop/kubernetes,wanghaoran1988/kubernetes,rrati/kubernetes,k82/kubernetes,kevensen/kubernetes,li-ang/kubernetes,verult/kubernetes,dims/kubernetes,monopole/kubernetes,andrewsykim/kubernetes,xychu/kubernetes,nckturner/kubernetes,zetaab/kubernetes,ravilr/kubernetes,tallclair/kubernetes,johscheuer/kubernetes,maciaszczykm/kubernetes,dims/kubernetes,weiwei04/kubernetes,dims/kubernetes,mkumatag/kubernetes,ingvagabund/kubernetes,li-ang/kubernetes,monopole/kubernetes,fejta/kubernetes,MHBauer/kubernetes,joelsmith/kubernetes,cofyc/kubernetes,openshift/kubernetes,mosoft521/kubernetes,maciaszczykm/kubernetes,alejandroEsc/kubernetes,roberthbailey/kubernetes,kubernetes/kubernetes,mfojtik/kubernetes,nak3/kubernetes,shyamjvs/kubernetes,iterion/kubernetes,luxas/kubernetes,ixdy/kubernetes,fejta/kubernetes,jingxu97/kubernetes,mYmNeo/kubernetes,yarntime/kubernetes,olivierlemasle/kubernetes,jackfrancis/kubernetes,spzala/kubernetes,saad-ali/kubernetes,jackfrancis/kubernetes,mengqiy/kubernetes,mahak/kubernetes,openshift/kubernetes,joelsmith/kubernetes,jagosan/kubernetes,humblec/kubernetes,jsafrane/kubernetes,monopole/kubernetes,sanjeevm0/kubernetes,BenTheElder/kubernetes,nikhita/kubernetes,sdminonne/kubernetes,openshift/kubernetes,mfojtik/kubernetes,k82/kubernetes,jackfrancis/kubernetes,mosoft521/kubernetes,cblecker/kubernetes,k82/kubernetes,pires/kubernetes,ping035627/kubernetes,krmayankk/kubernetes,kpgriffith/kubernetes,fanzhangio/kubernetes,li-ang/kubernetes,iterion/kubernetes,fejta/kubernetes,krmayankk/kubernetes,coolsvap/kubernetes,chrislovecnm/kubernetes,k82cn/kubernetes,tpepper/kubernetes,warmchang/kubernetes,huangjiuyuan/kubernetes,coolsvap/kubernetes,ingvagabund/kubernetes,wongma7/kubernetes,linux-on-ibm-z/kubernetes,MHBauer/kubernetes,mikebrow/kubernetes,Acidburn0zzz/kubernetes,cblecker/kubernetes,iterion/kubernetes,mfojtik/kubernetes,ii/kubernetes,csrwng/kubernetes,JacobTanenbaum/kubernetes,bparees/kubernetes,linux-on-ibm-z/kubernetes,xlgao-zju/kubernetes,kubernetes/kubernetes,Lion-Wei/kubernetes,spzala/kubernetes,iterion/kubernetes,carlory/kubernetes,ixdy/kubernetes,xychu/kubernetes,x13n/kubernetes,JacobTanenbaum/kubernetes,weiwei04/kubernetes,tomzhang/kubernetes,fejta/kubernetes,tcnghia/kubernetes,cofyc/kubernetes,jsafrane/kubernetes,krmayankk/kubernetes,chestack/kubernetes,tomerf/kubernetes,cmluciano/kubernetes,mengqiy/kubernetes,klaus1982/kubernetes,ingvagabund/kubernetes,erwinvaneyk/kubernetes,dlorenc/kubernetes,ping035627/kubernetes,jackfrancis/kubernetes,huangjiuyuan/kubernetes,xlgao-zju/kubernetes,cmluciano/kubernetes,soltysh/kubernetes,du2016/kubernetes,yarntime/kubernetes,MikeSpreitzer/kubernetes,tallclair/kubernetes,erwinvaneyk/kubernetes,idvoretskyi/kubernetes,zetaab/kubernetes,xlgao-zju/kubernetes,mosoft521/kubernetes,fabriziopandini/kubernetes,matthyx/kubernetes,joelsmith/kubernetes,bparees/kubernetes,enj/kubernetes,lojies/kubernetes,sanjeevm0/kubernetes,pires/kubernetes,yujuhong/kubernetes,matthyx/kubernetes,cblecker/kubernetes,rnaveiras/kubernetes,kevensen/kubernetes,huangjiuyuan/kubernetes,zetaab/kubernetes,soltysh/kubernetes,kevensen/kubernetes,Clarifai/kubernetes,alejandroEsc/kubernetes,xychu/kubernetes,wanghaoran1988/kubernetes,mfojtik/kubernetes,luxas/kubernetes,verb/kubernetes,verult/kubernetes,nak3/kubernetes,mikedanese/kubernetes,bparees/kubernetes,jingxu97/kubernetes,JacobTanenbaum/kubernetes,JacobTanenbaum/kubernetes,Acidburn0zzz/kubernetes,kitt1987/kubernetes,cofyc/kubernetes,johscheuer/kubernetes,tomerf/kubernetes,maciaszczykm/kubernetes,brendandburns/kubernetes,chrislovecnm/kubernetes,dixudx/kubernetes,jsafrane/kubernetes,cmluciano/kubernetes,verb/kubernetes,xlgao-zju/kubernetes,tpepper/kubernetes,Clarifai/kubernetes,warmchang/kubernetes,yarntime/kubernetes,krmayankk/kubernetes,feiskyer/kubernetes,tomerf/kubernetes,thockin/kubernetes,jdef/kubernetes,jagosan/kubernetes,stevesloka/kubernetes,deads2k/kubernetes,dixudx/kubernetes,linux-on-ibm-z/kubernetes,johscheuer/kubernetes,kevin-wangzefeng/kubernetes,x13n/kubernetes,Acidburn0zzz/kubernetes,PI-Victor/kubernetes,olivierlemasle/kubernetes,aledbf/kubernetes,wongma7/kubernetes,nak3/kubernetes,hex108/kubernetes,andrewsykim/kubernetes,stevesloka/kubernetes,iameli/kubernetes,ravisantoshgudimetla/kubernetes,carlory/kubernetes,olivierlemasle/kubernetes,mYmNeo/kubernetes,brendandburns/kubernetes,yujuhong/kubernetes,tcnghia/kubernetes,deads2k/kubernetes,du2016/kubernetes,jessfraz/kubernetes,Acidburn0zzz/kubernetes,kpgriffith/kubernetes,Clarifai/kubernetes,zhangmingld/kubernetes,zetaab/kubernetes,rafax/kubernetes,kevensen/kubernetes,lojies/kubernetes,MHBauer/kubernetes,feiskyer/kubernetes,saad-ali/kubernetes,kpgriffith/kubernetes,matthyx/kubernetes,pires/kubernetes,andrewrynhard/kubernetes,enj/kubernetes,Clarifai/kubernetes,gnufied/kubernetes,zhangmingld/kubernetes,luxas/kubernetes,weiwei04/kubernetes,saad-ali/kubernetes,shyamjvs/kubernetes,tpepper/kubernetes,humblec/kubernetes,mahak/kubernetes,kevin-wangzefeng/kubernetes,brendandburns/kubernetes,pires/kubernetes,chrislovecnm/kubernetes,pires/kubernetes,nckturner/kubernetes,maciaszczykm/kubernetes,PiotrProkop/kubernetes,aledbf/kubernetes,saad-ali/kubernetes,lojies/kubernetes,johscheuer/kubernetes,mkumatag/kubernetes,dereknex/kubernetes,xychu/kubernetes,tomerf/kubernetes,tomzhang/kubernetes,mkumatag/kubernetes,cofyc/kubernetes,k82cn/kubernetes,zhouhaibing089/kubernetes,zhangmingld/kubernetes,fgimenez/kubernetes,alejandroEsc/kubernetes,erwinvaneyk/kubernetes,tomzhang/kubernetes,andrewrynhard/kubernetes,shyamjvs/kubernetes,hex108/kubernetes,tengqm/kubernetes,nikhita/kubernetes,jessfraz/kubernetes,aledbf/kubernetes,ping035627/kubernetes,weiwei04/kubernetes,saad-ali/kubernetes,ravilr/kubernetes,lojies/kubernetes,hex108/kubernetes,tpepper/kubernetes,idvoretskyi/kubernetes,PI-Victor/kubernetes,kevin-wangzefeng/kubernetes,jdef/kubernetes,sethpollack/kubernetes,ixdy/kubernetes,mYmNeo/kubernetes,tengqm/kubernetes,verult/kubernetes,wanghaoran1988/kubernetes,fejta/kubernetes