[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. 
Didn't know return value is not required (thanks for pointing that out). Style-wise, is it a good idea to omit return though? Explicitly use the return value seems more clear for code readability. If this is the preferred way in scala, I will remove the return value.