YARN-2559. Fixed NPE in SystemMetricsPublisher when retrieving FinalApplicationStatus. Contributed by Zhijie Shen
(cherry picked from commit ee21b13cbd4654d7181306404174329f12193613)