merge YARN-716 from trunk. Fixed unit test failures - TestDistributedShell and TestUnmanagedAMLauncher. Contributed by Vinod Kumar Vavilapalli.