Add a test that calls all functions with arguments of all types that they claim to accept

Clean up various problems that it discovered. Log [CALCITE-525] "Exception-handling in built-in functions" for the remaining issues.

Close apache/incubator-calcite#28