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

In a few places the Scala (rather than Java) function class is used.
Merge pull request #489 from pwendell/SPARK-702

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