[SPARK-2693][SQL] Supported for UDAF Hive Aggregates like PERCENTILE

Implemented UDAF Hive aggregates by adding wrapper to Spark Hive.

Is `AbstractGenericUDAFResolver` serializable?  In general the reason we calculate the function inside of the expression is to avoid serialization errors