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.
Merge pull request #23 from JoshRosen/spark-833

Set SPARK_PUBLIC_DNS in spark-env.sh (to address SPARK-833)