[SPARK-4815][SQL] Fix: ThriftServer use only one SessionState to run sql using hive

Use a `SessionState` `ThreadLocal` in `HiveContext` to store all of the session states to the thread id.
The session state  will be updated when open a new `ExecuteStatementOperation`
I'm not sure we want to expose this as part of the public API, perhaps keep it as `protected[sql]`.