YARN-2701. Potential race condition in startLocalizer when using LinuxContainerExecutor. Contributed by Xuan Gong
(cherry picked from commit 2839365f230165222f63129979ea82ada79ec56e)