[SPARK-2852][MLLIB] Separate model from IDF/StandardScaler algorithms

This is part of SPARK-2828:

1. separate IDF model from IDF algorithm (which generates a model)
2. separate StandardScaler model from StandardScaler

CC: @dbtsai
Since users may want to know the variance of the training set, should we have constructor 

    class StandardScalerModel private[mllib] (
        val withMean: Boolean,
        val withStd: Boolean,
        val mean: BV[Double],
        val variance: BV[Double]) {

      lazy val factor = { 
        val temp = variance.clone
        while (i < temp.size) {
        temp(i) = if (temp(i) != 0.0) 1.0 / math.sqrt(temp(i)) else 0.0
         i += 1
         temp
        }
      }
    }