[SPARK-4648][SQL] Support COALESCE function in Spark SQL and Hive QL

Currently HiveQL uses Hive UDF function for Coalesce. Usually using hive udfs are memory intensive. Since Coalesce function is already available in Spark , we can make use of it. 
And also support Coalesce function in Spar SQL