Convert math functions to the UDF interface.

Also adds FunctionContext::GetNumArgs() method to the public UDF API.

Change-Id: I76e21814e423f075a0a22b4e924c1d3ec26daba7
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3410
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: Skye Wanderman-Milne <skye@cloudera.com>