[SPARK-4415] [PySpark] JVM should exit after Python exit

When JVM is started in a Python process, it should exit once the stdin is closed.

test: add spark.driver.memory in conf/spark-defaults.conf

```
davies@dm:~/work/spark$ cat conf/spark-defaults.conf
spark.driver.memory       8g
davies@dm:~/work/spark$ bin/pyspark
>>> quit
davies@dm:~/work/spark$ jps
4931 Jps
286
davies@dm:~/work/spark$ python wc.py
943738
0.719928026199
davies@dm:~/work/spark$ jps
286
4990 Jps
```

As suggested elsewhere
```
val isPythonSubprocess = sys.env.contains("IS_PYTHON_SUBPROCESS")
```