YARN-2630. Prevented previous AM container status from being acquired by the current restarted AM. Contributed by Jian He.

(cherry picked from commit 52bbe0f11bc8e97df78a1ab9b63f4eff65fd7a76)