Optimize java source-based UDF invocation

Patch by Robert Stupp; reviewed by Benjamin Lerer for CASSANDRA-7924
Fix pig tests on Windows

patch by Benjamin Lerer; reviewed by Josh McKenzie for CASSANDRA-7986