[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.
We've already done this for Hive 12, however `toHiveString` wasn't called back in #2685. Making `toHiveString` static sounds good.