[SPARK-6827] [MLLIB] Wrap FPGrowthModel.freqItemsets and make it consistent with Java API
[SPARK-6827] [MLLIB] Wrap FPGrowthModel.freqItemsets and make it consistent with Java API

Make PySpark ```FPGrowthModel.freqItemsets``` consistent with Java/Scala API like ```MatrixFactorizationModel.userFeatures```
It return a RDD with each tuple is composed of an array and a long value.
I think it's difficult to implement namedtuples to wrap the output because items of freqItemsets can be any type with arbitrary length which is tedious to impelement corresponding SerDe function.

Author: Yanbo Liang <ybliang8@gmail.com>

Closes #5614 from yanboliang/spark-6827 and squashes the following commits:

da8c404 [Yanbo Liang] use namedtuple
5532e78 [Yanbo Liang] Wrap FPGrowthModel.freqItemsets and make it consistent with Java API

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