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

Remaining:
 - [x] Python Support
 - [x] Python Test cases
 - [x] Move out of hive
 - [ ] scala Test cases
 - [ ] Input coercion?
In order to support functions take multiple arguments, it should be:

func = lambda _, it: imap(lambda x: f(*x), it)