Set SPARK_PUBLIC_DNS in spark-env.sh.
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.

1024inc/spark-ec2,romanini/spark-ec2,prateek-s/spark-ec2,skp33-info/spark-ec2,lckung/spark-ec2,1024inc/spark-ec2,paulomagalhaes/spark-ec2,denbkh/mesos-spark-ec2,lckung/spark-ec2,mesos/spark-ec2,smartkiwi/spark-ec2,piskvorky/spark-ec2,SRIKANTH-GIT/spark-ec2,tomerk/spark-ec2,megatron-me-uk/spark-ec2,lckung/spark-ec2,paulomagalhaes/spark-ec2,serialx/spark-ec2,hiconversion/spark-ec2,silvaurus/spark-ec2,stat-37601/spark-ec2,disconn3ct/spark-ec2,jeffusan/spark-ec2,Gaojiaqi/spark-ec2,disconn3ct/spark-ec2,howardlinus/spark-ec2,megatron-me-uk/spark-ec2,mesos/spark-ec2,dmtran-osc/spark-ec2,SRIKANTH-GIT/spark-ec2,BrandwatchLtd/spark-ec2,uronce-cc/spark-ec2,Gaojiaqi/spark-ec2,SiGe/spark-ec2,tomerk/spark-ec2,Wealthport/spark-ec2,saurfang/spark-ec2,jey/spark-ec2,hiconversion/spark-ec2,paulomagalhaes/spark-ec2,serialx/spark-ec2,rfarjadi/spark-ec2,denbkh/mesos-spark-ec2,pluribus-labs/spark-ec2,denbkh/amplab-spark-ec2,Verdad/spark-ec2-public,zhuj/spark-ec2,jyt109/spark-ec2,stat-37601/spark-ec2,prateek-s/spark-ec2,jey/spark-ec2,SRIKANTH-GIT/spark-ec2,silvaurus/spark-ec2,lckung/spark-ec2,inreachventures/spark-ec2,romanini/spark-ec2,jeffusan/spark-ec2,serialx/spark-ec2,tomerk/spark-ec2,madhavhugar/spark-ec2,inreachventures/spark-ec2,dmtran-osc/spark-ec2,jcazevedo/spark-ec2,zhuj/spark-ec2,jcazevedo/spark-ec2,prateek-s/spark-ec2,reactormonk/spark-ec2,apanda/spark-ec2,zhuj/spark-ec2,disconn3ct/spark-ec2,piskvorky/spark-ec2,mesos/spark-ec2,skp33-info/spark-ec2,rfarjadi/spark-ec2,pluribus-labs/spark-ec2,reactormonk/spark-ec2,SiGe/spark-ec2,amplab/spark-ec2,dm-tran/spark-ec2,skp33-info/spark-ec2,jeffusan/spark-ec2,smartkiwi/spark-ec2,howardlinus/spark-ec2,Verdad/spark-ec2-public,saurfang/spark-ec2,denbkh/amplab-spark-ec2,BrandwatchLtd/spark-ec2,dmtran-osc/spark-ec2,romanini/spark-ec2,hiconversion/spark-ec2,denbkh/amplab-spark-ec2,madhavhugar/spark-ec2,apanda/spark-ec2,rfarjadi/spark-ec2,howardlinus/spark-ec2,megatron-me-uk/spark-ec2,BrandwatchLtd/spark-ec2,Wealthport/spark-ec2,Verdad/spark-ec2-public,GordonWang/spark-ec2,Verdad/spark-ec2-public,dm-tran/spark-ec2,jcazevedo/spark-ec2,SiGe/spark-ec2,silvaurus/spark-ec2,GordonWang/spark-ec2,uronce-cc/spark-ec2,Gaojiaqi/spark-ec2,piskvorky/spark-ec2,jyt109/spark-ec2,1024inc/spark-ec2,saurfang/spark-ec2,amplab/spark-ec2,jyt109/spark-ec2,reactormonk/spark-ec2,madhavhugar/spark-ec2,denbkh/mesos-spark-ec2,dm-tran/spark-ec2,apanda/spark-ec2,amplab/spark-ec2,pluribus-labs/spark-ec2,Wealthport/spark-ec2