HPCC-10194 Handle NULL results from Java functions

For all Java function result handling, ensure that a returned NULL value
(instead of an actual object) is coerced into the appropriate value
(empty string, empty set, etc.).

Also add explicit DeleteLocalRef() JNI calls for references created and used
solely within tight loops to reduce the possibility of large structures (such
as large SET OF STRING values being passed) bumping into frame memory guards.
Merge branch 'dan-master'

Manually merged to squash commits and correct commit message formatting

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>