[SPARK-4494][mllib] 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)
https://github.com/yu-iskw/spark/commit/a3bf566e923be8c8d5787d8c8ffb777a5886f360#diff-7440885aeb7f73a84564ec244399fc5cL20