[SPARK-4057] Use -agentlib instead of -Xdebug in sbt-launch-lib.bash for debugging
[SPARK-4057] Use -agentlib instead of -Xdebug in sbt-launch-lib.bash for debugging

In -launch-lib.bash, -Xdebug option is used for debugging. We should use -agentlib option for Java 6+.

Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>

Closes #2904 from sarutak/SPARK-4057 and squashes the following commits:

39b5320 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-4057
26b4af8 [Kousuke Saruta] Improved java option for debugging

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