[SPARK-4309][SPARK-4407][SQL] Date type support for Thrift server, and fixes for complex types

SPARK-4407 was detected while working on SPARK-4309. Merged these two into a single PR since 1.2.0 RC is approaching.
Constructing a query execution for each column/row seems kind of expensive.  Can we instead just pull `toHiveString` out into a static function?