YARN-547. Fixed race conditions in public and private resource localization which used to cause duplicate downloads. Contributed by Omkar Vinit Joshi. svn merge --ignore-ancestry -c 1470076 ../../trunk/