YARN-2010. Handle app-recovery failures gracefully. (Jian He and Karthik Kambatla via kasha)