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

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