[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
```

Then we should rephrase this comment:
```
/**
 * The Spark submit JVM may run as a python subprocess, in which case the
 * JVM should terminate on broken pipe, which signals that the parent process
 * has exited. This is the case if the application is launched directly from
 * python, as in the PySpark shell. In Windows, the termination logic is handled
 * in java_gateway.py.
 */
```