[SPARK-3762] clear reference of SparkEnv after stop

SparkEnv is cached in ThreadLocal object, so after stop and create a new SparkContext, old SparkEnv is still used by some threads, it will trigger many problems, for example, pyspark will have problem after restart SparkContext, because py4j use thread pool for RPC.

This patch will clear all the references after stop a SparkEnv.

cc @mateiz @tdas @pwendell 
What about threads that have called `SparkEnv.set(SparkEnv.get)`?  I don't think those ThreadLocals will get cleared.