[SPARK-2511][MLLIB] add HashingTF and IDF

This is roughly the TF-IDF implementation used in the Databricks Cloud Demo: http://databricks.com/cloud/ .

Both `HashingTF` and `IDF` are implemented as transformers, similar to scikit-learn.
Can you add a Java-friendly version of these tool? This looks like `scala.Iterable`. For the Java one you will probably have to make it take `JavaRDD` since we can't have methods that differ on the element type of RDD.

Once you add it, please add a Java test that uses it as well so we make sure it compiles in Java with no surprises.