[Spark-4060] [MLlib] exposing special rdd functions to the public

In the tests it works fine. I just wanted to expose as less as possible.
Shall I replace "private[mllib]" with "@DeveloperApi"?