SPARK-2895: Add mapPartitionsWithContext related support on Spark Java API.

remove this once you remove the api above