[SPARK-2435] Add shutdown hook to pyspark