Fix JavaRDDLike.flatMap(PairFlatMapFunction) (SPARK-668).

This workaround is easier than rewriting JavaRDDLike in Java.
Merge pull request #417 from JoshRosen/spark-668

Fix JavaRDDLike.flatMap(PairFlatMapFunction) (SPARK-668).