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