[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`).
Ah I see where the problem is: the assembly jar is built with `-Phive-0.12.0` [1] while the test is executed with `-Phive` [2], which implies `-Phive-0.13.1`.

[1] https://github.com/apache/spark/blob/7768a800d4c4c19d76cef1ee40af6900bbac821c/dev/run-tests#L143
[2] https://github.com/apache/spark/blob/7768a800d4c4c19d76cef1ee40af6900bbac821c/dev/run-tests#L170