YARN-378. Fix RM to make the AM max attempts/retries to be configurable per application by clients. Contributed by Zhijie Shen. svn merge --ignore-ancestry -c 1460895 ../../trunk/