Merge pull request #22 from JoshRosen/spark-919

Use 'return' instead of 'exit in init & setup scripts (SPARK-919)
Set SPARK_PUBLIC_DNS in spark-env.sh.

This addresses SPARK-833, an issue where Spark web UIs might
be bound to non-public addresses when running on EC2.  We solved
this problem for the Master and Worker UIs, but SPARK_PUBLIC_DNS
needs to be set in the driver's environment in order for the
application web UI to bind to the correct public address.

Some drivers, like programs run through `sbt run` or IPython
notebook, will need to `source spark-env.sh` or otherwise
copy its SPARK_PUBLIC_DNS setting.  This commit ensures that
SPARK_PUBLIC_DNS is set properly for programs run through
`pyspark` and the `run-example` scripts.