[SPARK-4697][YARN]System properties should override environment variables

I found some arguments in yarn module take environment variables before system properties while the latter override the former in core module.
After taking a look at https://github.com/apache/spark/pull/539 and https://github.com/apache/spark/pull/699, I am not sure I understand what you means here. The app names observed by RM is set by `appContext.setApplicationName(args.appName)` while `args.appName` is decided by `SPARK_YARN_APP_NAME` than `spark.app.name`.
I still can't see why change this two's order could affect other aspects.