initial refactoring of ml_generate_ml_model() to support including index_to_string in pipeline
initial refactoring of ml_generate_ml_model() to support including index_to_string in pipeline

kevinykuo/sparklyr,rstudio/sparklyr,kevinykuo/sparklyr,rstudio/sparklyr,kevinykuo/sparklyr,rstudio/sparklyr,rstudio/sparklyr,kevinykuo/sparklyr