[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
This class is only used for keeping the state of withMean, and withStd, is it possible to move those states to fit function by overloading, and make it as object?