YARN-611. Added an API to let apps specify an interval beyond which AM failures should be ignored towards counting max-attempts. Contributed by Xuan Gong.

(cherry picked from commit 14e2639fd0d53f7e0b58f2f4744af44983d4e867)