SPARK-702: Replace Function --> JFunction in JavaAPI Suite.

In a few places the Scala (rather than Java) function class is used.