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

I'd rather not link to the yarn documentation here in case it changes locations. Perhaps add a statement about it not being allowed to be bigger then the cluster configured max.