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

its not the number of application submission attempts though, this is how many times the resource manager will retry the application for you.  to me application submission is done by the client, not a retry from the RM.  what isn't clear about the current one so we can come up with something more clear? We could do something like ApplicationMasterMaxAttempts, am-maxattempts, rmappattempts