Set SPARK_PUBLIC_DNS in spark-env.sh and .bash_profile

This will help in two ways:
- Scripts like bin/start-all.sh will always see it instead of relying on
  heuristics (e.g. does the hostname begin with ec2)
- User applications run from the command line will also see it, and will
  report correct application URLs to the cluster scheduler
Merge pull request #18 from mateiz/public-dns-fix

Set SPARK_PUBLIC_DNS in spark-env.sh and .bash_profile
update the out-of-date public_dns_name fetching URL
Merge pull request #30 from CodingCat/update-the-public-dns-name-retrieving-address

update the out-of-date public_dns_name fetching URL
Added SPARK_MASTER_OPTS configuration
Merge branch 'master' of https://github.com/mesos/spark-ec2 into configurable_workers