[SPARK-4037][SQL] Removes the SessionState instance created in HiveThriftServer2

`HiveThriftServer2` creates a global singleton `SessionState` instance and overrides `HiveContext` to inject the `SessionState` object. This messes up `SessionState` initialization and causes problems.

This PR replaces the global `SessionState` with `HiveContext.sessionState` to avoid the initialization conflict. Also `HiveContext` reuses existing started `SessionState` if any (this is required by `SparkSQLCLIDriver`, which uses specialized `CliSessionState`).
Hm, `sessionState` do gets started within the same thread multiple times. However, at least for Hive 0.12.0, I think `SessionState.start(sessionState)` should be an idempotent operation, calling it multiple times shouldn't hurt. Maybe this doesn't hold anymore for Hive 0.13.1.

Another issue that really puzzles me is this line from the [Jenkins test failure log](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22361/testReport/org.apache.spark.sql.hive.execution/HiveCompatibilitySuite/groupby1/):

```
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:342)
```

The line number suggests that apparently Hive 0.13.1 was used (see [here](https://github.com/apache/hive/blob/release-0.13.1/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java#L342)), but this Jenkins build was triggered with

```
-Pyarn -Phadoop-2.3 -Dhadoop.version=2.3.0 -Pkinesis-asl -Phive -Phive-0.12.0
```

Anyway, I'll follow your suggestion to avoid starting `sessionState` multiple times and try again. Thanks!