[WIP][SPARK-2097][SQL] UDF Support

Remaining:
 - [x] Python Support
 - [x] Python Test cases
 - [x] Move out of hive
 - [ ] scala Test cases
 - [ ] Input coercion?
Is it possible that the input of this UDF needs to refer to attributes from multiple children? For example, a UDF is used in a Join condition?