[SPARK-1097] Workaround Hadoop conf ConcurrentModification issue

Workaround Hadoop conf ConcurrentModification issue


We can keep without the check, the NPE should be apparent on the synchronized block.