[SparkSQL, Thrift] SPARK-4700: Add HTTP protocol spark thrift server

Add HTTP protocol support and test cases to spark thrift server, so users can deploy thrift server in both TCP and http mode. 
Yea, usually we don't use `return` unless absolutely necessary. Everything is an expression in Scala, and the last expression of the function body is the return value.

BTW, here is a brief [Spark code style guide] [1].

[1]: https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide