Improve error handling of experimental features in non-experimental mode
Improve error handling of experimental features in non-experimental mode

This fix tries to address several issues raised in 28626 where
run against a non-experimental daemon may not generate correct
error message:
1. Incorrect flags were not checked against the supported features:
   ```
   $ docker stack --nonsense
   unknown flag: --nonsense
   ```
2. Subcommands were not checked against the supported features:
   ```
   $ docker stack ls
   Error response from daemon: This node is not a swarm manager...
   ```

This fix address the above mentioned issues by:
1. Add a pre-check for FlagErrorFunc
2. Recursively check if a feature is supported for cmd and its parents.

This fix fixes 28626.

Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>

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