[SPARK-2410][SQL][WIP] Cherry picked Hive Thrift/JDBC server

JIRA issue: [SPARK-2410](https://issues.apache.org/jira/browse/SPARK-2410)

Cherry picked the Hive Thrift/JDBC server from [branch-1.0-jdbc](https://github.com/apache/spark/tree/branch-1.0-jdbc). 

(Thanks @chenghao-intel for his initial contribution of the Spark SQL CLI.)
Checkout `spark-shell` for an example of a user-facing script that triages options to `spark-submit`.