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

Thanks for the much better solution. That works just fine.