[SPARK-4461][YARN] pass extra java options to yarn application master

Currently, there is no way to pass yarn am specific java options. It cause some potential issues when reading classpath from hadoop configuration file. Hadoop configuration actually replace variables in its property with the system property passed in java options. How to specify the value depends on different hadoop distribution.

The new options are SPARK_YARN_JAVA_OPTS or spark.yarn.extraJavaOptions. I make it as spark global level, because typically we don't want user to specify this in their command line each time submitting spark job after it is setup in spark-defaults.conf.

In addition, with this new extra options enabled to be passed to AM, it provides more flexibility. 

For example int the following valid mapred-site.xml file, we have the class path which specify values using system property. Hadoop can correctly handle it because it has java options passed in. 

This is the example, currently spark will break due to hadoop.version is not passed in.
  <property>
    <name>mapreduce.application.classpath</name>
    <value>/etc/hadoop/${hadoop.version}/mapreduce/*</value>
  </property>

In the meantime, we cannot relies on  mapreduce.admin.map.child.java.opts in mapred-site.xml, because it has its own extra java options specified, which does not apply to Spark.
so currently this affects both cluster and client mode since driver.extraJavaOptions applies in cluster mode I think we should make this only apply in client mode.  Otherwise we should define precendence between it and the driver.extraJavaOptions in driver mode or potentially error if they aren't set.  It seems most straight forward to only have it apply in client mode but I'm open to thoughts  - @vanzin @andrewor14 .

Also we should run this through the check like in SparkConf for spark.executor.extraJavaOptions to make sure no spark configs or -Xmx is set.