[SPARK-9607] [SPARK-9608] fix zinc-port handling in build/mvn
[SPARK-9607] [SPARK-9608] fix zinc-port handling in build/mvn

- pass `$ZINC_PORT` to zinc status/shutdown commands
- fix path check that sets `$ZINC_INSTALL_FLAG`, which was incorrectly
  causing zinc to be shutdown and restarted every time (with mismatched
  ports on those commands to boot)
- pass `-DzincPort=${ZINC_PORT}` to maven, to use the correct zinc port
  when building

Author: Ryan Williams <ryan.blake.williams@gmail.com>

Closes #7944 from ryan-williams/zinc-status and squashes the following commits:

619c520 [Ryan Williams] fix zinc status/shutdown commands

HyukjinKwon/spark,nlalevee/spark,shaneknapp/spark,vinodkc/spark,szhem/spark,saturday-shi/spark,kissmetrics/spark,metamx/spark,1haodian/spark,JerryLead/spark,kevinyu98/spark,rekhajoshm/spark,facaiy/spark,pgandhi999/spark,debugger87/spark,rikima/spark,ron8hu/spark,hhbyyh/spark,shuangshuangwang/spark,setjet/spark,rekhajoshm/spark,nchammas/spark,holdenk/spark,alunarbeach/spark,kimoonkim/spark,mahak/spark,publicRoman/spark,witgo/spark,ahnqirage/spark,ueshin/apache-spark,hvanhovell/spark,dhruve/spark,jkbradley/spark,saltstar/spark,mike0sv/spark,jkbradley/spark,actuaryzhang/spark,BryanCutler/spark,srowen/spark,mdespriee/spark,sachintyagi22/spark,haowu80s/spark,saltstar/spark,big-pegasus/spark,witgo/spark,LantaoJin/spark,pgandhi999/spark,ioana-delaney/spark,minixalpha/spark,nilsgrabbert/spark,MLnick/spark,bravo-zhang/spark,goldmedal/spark,ConeyLiu/spark,ron8hu/spark,sachintyagi22/spark,apache-spark-on-k8s/spark,BryanCutler/spark,milliman/spark,byakuinss/spark,shaneknapp/spark,gengliangwang/spark,markhamstra/spark,caneGuy/spark,ibm-research-ireland/sparkoscope,eyalfa/spark,mzl9039/spark,jianran/spark,zhouyejoe/spark,apache-spark-on-k8s/spark,rikima/spark,ioana-delaney/spark,yanboliang/spark,brad-kaiser/spark,xuanyuanking/spark,ahnqirage/spark,sureshthalamati/spark,witgo/spark,jrshust/spark,big-pegasus/spark,dbtsai/spark,jkbradley/spark,jianran/spark,someorz/spark,esi-mineset/spark,joseph-torres/spark,apache-spark-on-k8s/spark,vinodkc/spark,saltstar/spark,nlalevee/spark,zero323/spark,wangyum/spark,taroplus/spark,BryanCutler/spark,cin/spark,alunarbeach/spark,chuckchen/spark,JerryLead/spark,jianran/spark,ddna1021/spark,yanboliang/spark,huang1900/spark,dongjoon-hyun/spark,minixalpha/spark,WindCanDie/spark,chuckchen/spark,narahari92/spark,rikima/spark,JerryLead/spark,spark-test/spark,chuckchen/spark,ddna1021/spark,tejasapatil/spark,metamx/spark,joseph-torres/spark,MLnick/spark,sahilTakiar/spark,tengpeng/spark,UndeadBaneGitHub/spark,actuaryzhang/spark,tengpeng/spark,rezasafi/spark,mahak/spark,lxsmnv/spark,mahak/spark,kimoonkim/spark,xuanyuanking/spark,HyukjinKwon/spark,rikima/spark,bravo-zhang/spark,loneknightpy/spark,poffuomo/spark,hvanhovell/spark,sahilTakiar/spark,milliman/spark,shaneknapp/spark,facaiy/spark,ueshin/apache-spark,taroplus/spark,apache-spark-on-k8s/spark,bdrillard/spark,lvdongr/spark,techaddict/spark,hvanhovell/spark,shubhamchopra/spark,ericvandenbergfb/spark,joseph-torres/spark,JoshRosen/spark,publicRoman/spark,janewangfb/spark,taroplus/spark,lxsmnv/spark,narahari92/spark,mzl9039/spark,kimoonkim/spark,hhbyyh/spark,WeichenXu123/spark,sahilTakiar/spark,mzl9039/spark,MLnick/spark,cloud-fan/spark,kiszk/spark,BryanCutler/spark,wangyum/spark,map222/spark,skonto/spark,haowu80s/spark,dongjoon-hyun/spark,apache-spark-on-k8s/spark,esi-mineset/spark,lxsmnv/spark,UndeadBaneGitHub/spark,rednaxelafx/apache-spark,jlopezmalla/spark,icexelloss/spark,rezasafi/spark,eyalfa/spark,szhem/spark,alunarbeach/spark,ibm-research-ireland/sparkoscope,mdespriee/spark,sahilTakiar/spark,ddna1021/spark,apache/spark,big-pegasus/spark,maropu/spark,taroplus/spark,zhouyejoe/spark,zero323/spark,liyichao/spark,shubhamchopra/spark,metamx/spark,WindCanDie/spark,zzcclp/spark,1haodian/spark,metamx/spark,ahnqirage/spark,nchammas/spark,hhbyyh/spark,liutang123/spark,ptkool/spark,techaddict/spark,wangyum/spark,huang1900/spark,andrewor14/spark,nilsgrabbert/spark,matthewfranglen/spark,ericvandenbergfb/spark,map222/spark,ibm-research-ireland/sparkoscope,kissmetrics/spark,Panos-Bletsos/spark-cost-model-optimizer,eyalfa/spark,wzhfy/spark,milliman/spark,aosagie/spark,esi-mineset/spark,HyukjinKwon/spark,maropu/spark,panfengfeng/spark,byakuinss/spark,byakuinss/spark,dhruve/spark,akopich/spark,nchammas/spark,tengpeng/spark,skonto/spark,facaiy/spark,tengpeng/spark,ioana-delaney/spark,sahilTakiar/spark,dbtsai/spark,shaneknapp/spark,setjet/spark,caneGuy/spark,chuckchen/spark,kimoonkim/spark,panfengfeng/spark,darionyaphet/spark,ajaysaini725/spark,jianran/spark,akopich/spark,kiszk/spark,markhamstra/spark,maropu/spark,lvdongr/spark,srowen/spark,stanzhai/spark,narahari92/spark,zero323/spark,aokolnychyi/spark,saturday-shi/spark,gengliangwang/spark,facaiy/spark,markhamstra/spark,ioana-delaney/spark,sahilTakiar/spark,liutang123/spark,1haodian/spark,nchammas/spark,haowu80s/spark,1haodian/spark,spark-test/spark,haowu80s/spark,publicRoman/spark,shubhamchopra/spark,mike0sv/spark,guoxiaolongzte/spark,wangyum/spark,mzl9039/spark,jlopezmalla/spark,WeichenXu123/spark,tejasapatil/spark,UndeadBaneGitHub/spark,liutang123/spark,adrian-ionescu/apache-spark,dbtsai/spark,JoshRosen/spark,michalsenkyr/spark,janewangfb/spark,zero323/spark,SHASHANKB/spark,mahak/spark,minixalpha/spark,kimoonkim/spark,caneGuy/spark,ron8hu/spark,JoshRosen/spark,esi-mineset/spark,facaiy/spark,pgandhi999/spark,icexelloss/spark,shuangshuangwang/spark,highfei2011/spark,debugger87/spark,bdrillard/spark,bravo-zhang/spark,lvdongr/spark,ptkool/spark,ron8hu/spark,andrewor14/spark,nlalevee/spark,loneknightpy/spark,map222/spark,minixalpha/spark,ConeyLiu/spark,dbtsai/spark,holdenk/spark,jiangxb1987/spark,minixalpha/spark,metamx/spark,adrian-ionescu/apache-spark,liyichao/spark,hhbyyh/spark,cin/spark,witgo/spark,xflin/spark,ddna1021/spark,pronix/spark,gioenn/xSpark,kissmetrics/spark,ConeyLiu/spark,lvdongr/spark,saturday-shi/spark,saturday-shi/spark,jkbradley/spark,apache/spark,ahnqirage/spark,WindCanDie/spark,zuotingbing/spark,WeichenXu123/spark,ron8hu/spark,srowen/spark,aray/spark,jianran/spark,vinodkc/spark,highfei2011/spark,zero323/spark,gioenn/xSpark,wangmiao1981/spark,pgandhi999/spark,liyichao/spark,wzhfy/spark,panfengfeng/spark,tengpeng/spark,rekhajoshm/spark,gengliangwang/spark,goldmedal/spark,akopich/spark,spark-test/spark,JerryLead/spark,maropu/spark,apache-spark-on-k8s/spark,sureshthalamati/spark,WeichenXu123/spark,panfengfeng/spark,darionyaphet/spark,huang1900/spark,sachintyagi22/spark,ConeyLiu/spark,setjet/spark,rezasafi/spark,zhouyejoe/spark,ericvandenbergfb/spark,jiangxb1987/spark,debugger87/spark,poffuomo/spark,actuaryzhang/spark,HyukjinKwon/spark,brad-kaiser/spark,skonto/spark,Panos-Bletsos/spark-cost-model-optimizer,saturday-shi/spark,rikima/spark,rezasafi/spark,aosagie/spark,wangmiao1981/spark,Aegeaner/spark,aray/spark,publicRoman/spark,goldmedal/spark,jkbradley/spark,holdenk/spark,HyukjinKwon/spark,mdespriee/spark,highfei2011/spark,JoshRosen/spark,SHASHANKB/spark,liyichao/spark,holdenk/spark,aokolnychyi/spark,ueshin/apache-spark,srowen/spark,milliman/spark,hhbyyh/spark,vinodkc/spark,LantaoJin/spark,debugger87/spark,tejasapatil/spark,adrian-ionescu/apache-spark,ueshin/apache-spark,narahari92/spark,gengliangwang/spark,hvanhovell/spark,stanzhai/spark,adrian-ionescu/apache-spark,MLnick/spark,jkbradley/spark,skonto/spark,ahnqirage/spark,mike0sv/spark,zzcclp/spark,joseph-torres/spark,panfengfeng/spark,adrian-ionescu/apache-spark,kevinyu98/spark,panfengfeng/spark,spark-test/spark,rekhajoshm/spark,dhruve/spark,dbtsai/spark,joseph-torres/spark,milliman/spark,guoxiaolongzte/spark,patrick-nicholson/spark,janewangfb/spark,aosagie/spark,apache/spark,lxsmnv/spark,spark-test/spark,shuangshuangwang/spark,ron8hu/spark,jiangxb1987/spark,jiangxb1987/spark,bOOm-X/spark,wangyum/spark,ptkool/spark,LantaoJin/spark,goldmedal/spark,taroplus/spark,gengliangwang/spark,hvanhovell/spark,nchammas/spark,stanzhai/spark,jlopezmalla/spark,jrshust/spark,loneknightpy/spark,shaneknapp/spark,zuotingbing/spark,taroplus/spark,aokolnychyi/spark,loneknightpy/spark,hhbyyh/spark,mahak/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,ericvandenbergfb/spark,maropu/spark,liutang123/spark,ericvandenbergfb/spark,ibm-research-ireland/sparkoscope,caneGuy/spark,rekhajoshm/spark,xflin/spark,cin/spark,hvanhovell/spark,Aegeaner/spark,stanzhai/spark,pgandhi999/spark,aosagie/spark,SnappyDataInc/spark,brad-kaiser/spark,haowu80s/spark,metamx/spark,SnappyDataInc/spark,vinodkc/spark,saltstar/spark,map222/spark,chuckchen/spark,nilsgrabbert/spark,sureshthalamati/spark,holdenk/spark,nchammas/spark,ddna1021/spark,hhbyyh/spark,highfei2011/spark,hvanhovell/spark,ddna1021/spark,stanzhai/spark,bdrillard/spark,saturday-shi/spark,witgo/spark,nlalevee/spark,chuckchen/spark,aosagie/spark,michalsenkyr/spark,mdespriee/spark,loneknightpy/spark,xuanyuanking/spark,aray/spark,pronix/spark,map222/spark,bravo-zhang/spark,Panos-Bletsos/spark-cost-model-optimizer,ericvandenbergfb/spark,bravo-zhang/spark,shuangshuangwang/spark,ibm-research-ireland/sparkoscope,lxsmnv/spark,sureshthalamati/spark,shuangshuangwang/spark,skonto/spark,minixalpha/spark,icexelloss/spark,dongjoon-hyun/spark,huang1900/spark,saltstar/spark,eyalfa/spark,rikima/spark,LantaoJin/spark,kevinyu98/spark,maropu/spark,dhruve/spark,icexelloss/spark,nchammas/spark,maropu/spark,aray/spark,techaddict/spark,wzhfy/spark,liyichao/spark,ioana-delaney/spark,Panos-Bletsos/spark-cost-model-optimizer,kiszk/spark,jianran/spark,dbtsai/spark,narahari92/spark,aokolnychyi/spark,yanboliang/spark,zuotingbing/spark,ioana-delaney/spark,dhruve/spark,andrewor14/spark,LantaoJin/spark,sureshthalamati/spark,techaddict/spark,liyichao/spark,HyukjinKwon/spark,tejasapatil/spark,setjet/spark,debugger87/spark,lxsmnv/spark,poffuomo/spark,poffuomo/spark,JoshRosen/spark,shaneknapp/spark,cin/spark,JerryLead/spark,bdrillard/spark,rezasafi/spark,mdespriee/spark,xuanyuanking/spark,michalsenkyr/spark,guoxiaolongzte/spark,jrshust/spark,akopich/spark,minixalpha/spark,bdrillard/spark,SnappyDataInc/spark,someorz/spark,publicRoman/spark,caneGuy/spark,big-pegasus/spark,markhamstra/spark,aray/spark,cloud-fan/spark,aokolnychyi/spark,kissmetrics/spark,mike0sv/spark,eyalfa/spark,highfei2011/spark,WindCanDie/spark,rezasafi/spark,zzcclp/spark,byakuinss/spark,Aegeaner/spark,alunarbeach/spark,markhamstra/spark,ajaysaini725/spark,kiszk/spark,Panos-Bletsos/spark-cost-model-optimizer,WeichenXu123/spark,sahilTakiar/spark,rednaxelafx/apache-spark,kiszk/spark,big-pegasus/spark,ptkool/spark,zhouyejoe/spark,xuanyuanking/spark,ron8hu/spark,zhouyejoe/spark,JoshRosen/spark,mzl9039/spark,byakuinss/spark,guoxiaolongzte/spark,michalsenkyr/spark,ajaysaini725/spark,1haodian/spark,SHASHANKB/spark,markhamstra/spark,jrshust/spark,dongjoon-hyun/spark,janewangfb/spark,pronix/spark,loneknightpy/spark,SHASHANKB/spark,actuaryzhang/spark,metamx/spark,srowen/spark,chuckchen/spark,techaddict/spark,michalsenkyr/spark,srowen/spark,techaddict/spark,aosagie/spark,wangmiao1981/spark,janewangfb/spark,joseph-torres/spark,icexelloss/spark,alunarbeach/spark,xflin/spark,jlopezmalla/spark,1haodian/spark,Aegeaner/spark,SHASHANKB/spark,dhruve/spark,mdespriee/spark,xflin/spark,SnappyDataInc/spark,goldmedal/spark,cin/spark,gioenn/xSpark,someorz/spark,ajaysaini725/spark,ericvandenbergfb/spark,dhruve/spark,someorz/spark,ptkool/spark,saltstar/spark,ueshin/apache-spark,MLnick/spark,Aegeaner/spark,alunarbeach/spark,mzl9039/spark,mike0sv/spark,shubhamchopra/spark,mzl9039/spark,jrshust/spark,kimoonkim/spark,darionyaphet/spark,kissmetrics/spark,shaneknapp/spark,facaiy/spark,liyichao/spark,brad-kaiser/spark,poffuomo/spark,wangmiao1981/spark,yanboliang/spark,poffuomo/spark,joseph-torres/spark,wzhfy/spark,kevinyu98/spark,sachintyagi22/spark,gioenn/xSpark,techaddict/spark,zhouyejoe/spark,zero323/spark,guoxiaolongzte/spark,gioenn/xSpark,zzcclp/spark,wzhfy/spark,patrick-nicholson/spark,patrick-nicholson/spark,rezasafi/spark,icexelloss/spark,pgandhi999/spark,jlopezmalla/spark,ajaysaini725/spark,kevinyu98/spark,szhem/spark,mike0sv/spark,srowen/spark,eyalfa/spark,jiangxb1987/spark,nilsgrabbert/spark,poffuomo/spark,lvdongr/spark,markhamstra/spark,facaiy/spark,narahari92/spark,MLnick/spark,xflin/spark,darionyaphet/spark,LantaoJin/spark,bOOm-X/spark,spark-test/spark,jrshust/spark,ahnqirage/spark,patrick-nicholson/spark,shubhamchopra/spark,WeichenXu123/spark,aray/spark,UndeadBaneGitHub/spark,vinodkc/spark,akopich/spark,liutang123/spark,actuaryzhang/spark,ptkool/spark,dbtsai/spark,milliman/spark,nlalevee/spark,publicRoman/spark,xuanyuanking/spark,bOOm-X/spark,SHASHANKB/spark,HyukjinKwon/spark,ibm-research-ireland/sparkoscope,narahari92/spark,brad-kaiser/spark,kissmetrics/spark,SnappyDataInc/spark,zero323/spark,skonto/spark,yanboliang/spark,bdrillard/spark,zuotingbing/spark,andrewor14/spark,highfei2011/spark,jlopezmalla/spark,xuanyuanking/spark,Panos-Bletsos/spark-cost-model-optimizer,brad-kaiser/spark,wangmiao1981/spark,witgo/spark,ajaysaini725/spark,publicRoman/spark,zuotingbing/spark,debugger87/spark,jkbradley/spark,kiszk/spark,liutang123/spark,nilsgrabbert/spark,byakuinss/spark,darionyaphet/spark,alunarbeach/spark,gengliangwang/spark,rekhajoshm/spark,cloud-fan/spark,bOOm-X/spark,patrick-nicholson/spark,actuaryzhang/spark,bOOm-X/spark,xflin/spark,UndeadBaneGitHub/spark,wangmiao1981/spark,ConeyLiu/spark,setjet/spark,mahak/spark,nilsgrabbert/spark,loneknightpy/spark,cin/spark,ConeyLiu/spark,bOOm-X/spark,yanboliang/spark,goldmedal/spark,kimoonkim/spark,zzcclp/spark,shubhamchopra/spark,bOOm-X/spark,WindCanDie/spark,WindCanDie/spark,eyalfa/spark,gengliangwang/spark,rednaxelafx/apache-spark,icexelloss/spark,LantaoJin/spark,pgandhi999/spark,milliman/spark,xflin/spark,zuotingbing/spark,WeichenXu123/spark,aray/spark,adrian-ionescu/apache-spark,debugger87/spark,bdrillard/spark,zzcclp/spark,andrewor14/spark,caneGuy/spark,rednaxelafx/apache-spark,sureshthalamati/spark,witgo/spark,esi-mineset/spark,bravo-zhang/spark,BryanCutler/spark,pronix/spark,aosagie/spark,kissmetrics/spark,szhem/spark,brad-kaiser/spark,ioana-delaney/spark,mike0sv/spark,sachintyagi22/spark,map222/spark,aokolnychyi/spark,skonto/spark,andrewor14/spark,setjet/spark,saturday-shi/spark,SHASHANKB/spark,apache-spark-on-k8s/spark,wzhfy/spark,andrewor14/spark,kevinyu98/spark,BryanCutler/spark,wangyum/spark,cloud-fan/spark,guoxiaolongzte/spark,szhem/spark,jiangxb1987/spark,sachintyagi22/spark,darionyaphet/spark,zzcclp/spark,darionyaphet/spark,byakuinss/spark,cloud-fan/spark,esi-mineset/spark,shubhamchopra/spark,big-pegasus/spark,jlopezmalla/spark,michalsenkyr/spark,janewangfb/spark,rednaxelafx/apache-spark,vinodkc/spark,shuangshuangwang/spark,tejasapatil/spark,szhem/spark,apache/spark,liutang123/spark,janewangfb/spark,actuaryzhang/spark,huang1900/spark,kiszk/spark,gioenn/xSpark,someorz/spark,apache/spark,map222/spark,tengpeng/spark,michalsenkyr/spark,sachintyagi22/spark,SnappyDataInc/spark,ueshin/apache-spark,ddna1021/spark,nilsgrabbert/spark,holdenk/spark,szhem/spark,ueshin/apache-spark,stanzhai/spark,JerryLead/spark,UndeadBaneGitHub/spark,rikima/spark,stanzhai/spark,caneGuy/spark,saltstar/spark,wzhfy/spark,sureshthalamati/spark,zhouyejoe/spark,mahak/spark,ptkool/spark,pronix/spark,zuotingbing/spark,BryanCutler/spark,yanboliang/spark,cloud-fan/spark,gioenn/xSpark,patrick-nicholson/spark,huang1900/spark,lvdongr/spark,mdespriee/spark,someorz/spark,setjet/spark,taroplus/spark,tejasapatil/spark,lxsmnv/spark,1haodian/spark,WindCanDie/spark,lvdongr/spark,Panos-Bletsos/spark-cost-model-optimizer,ajaysaini725/spark,adrian-ionescu/apache-spark,tengpeng/spark,esi-mineset/spark,dongjoon-hyun/spark,spark-test/spark,akopich/spark,guoxiaolongzte/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,kevinyu98/spark,jiangxb1987/spark,patrick-nicholson/spark,JoshRosen/spark,JerryLead/spark,big-pegasus/spark,UndeadBaneGitHub/spark,ConeyLiu/spark,Aegeaner/spark,tejasapatil/spark,jrshust/spark,ahnqirage/spark,cloud-fan/spark,ibm-research-ireland/sparkoscope,MLnick/spark,bravo-zhang/spark,highfei2011/spark,wangmiao1981/spark,holdenk/spark,SnappyDataInc/spark,cin/spark,aokolnychyi/spark,wangyum/spark,shuangshuangwang/spark,akopich/spark,huang1900/spark,panfengfeng/spark,haowu80s/spark,jianran/spark,Aegeaner/spark,apache/spark,rekhajoshm/spark,nlalevee/spark,nlalevee/spark,goldmedal/spark,apache/spark,pronix/spark,someorz/spark