Fix https://github.com/julianhyde/optiq/issues/228, "Error while compiling generated Java code when using UDF in expression"
Add SqlUnresolvedFunction, to improve how return type of user-defined functions is resolved.

Even though SqlValidator had overload detection and type resolution logic it did not fire since function.getFunctionType() == null was always false.