HADOOP-6269. Fix threading issue with defaultResource in Configuration. Contributed by Sreekanth Ramakrishnan