PIG-3354: UDF example does not handle nulls

git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1496231 13f79535-47bb-0310-9956-ffa450edef68
PIG-3361: Improve Hadoop version detection logic for Pig unit test

git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1496241 13f79535-47bb-0310-9956-ffa450edef68
PIG-3021