[SPARK-4494] IDFModel.transform() add support for single vector

I improved `IDFModel.transform` to allow using a single vector.

[[SPARK-4494] IDFModel.transform() add support for single vector - ASF JIRA](https://issues.apache.org/jira/browse/SPARK-4494)
This is a public API change, so it's a bit worrisome.  On the other hand, it makes sense to change it if this method includes single-vector transforms too.  @mengxr  Opinion?