Update Shark for consistency with new Java API.

This brings Shark up to date with Spark commit
181ec50307 (which changes the Java Function class).
Merge pull request #308 from kayousterhout/java_fix

Update Shark for consistency with new Java API.