[SPARK-2165] spark on yarn: add support for setting maxAppAttempts in the ApplicationSubmissionContext

I would prefer this to be called `spark.yarn.applicationSubmissionMaxAttempts` to be more specific