[SPARK-3729][SQL] Do all hive session state initilialization in lazy val

This change avoids a NPE during context initialization when settings are present.