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

hadoop 0.23 (yarn alpha) doesn't have a setMaxAppAttempts routine.  Just remove this and only do it in the yarn stable version.