[SPARK-4229] Create hadoop configuration in a consistent way

@koeninger The issue that you linked is concerned with thread-safety issues when multiple threads concurrently modify the same `Configuration` instance.

It turns out that there's another, older thread-safety issue related to `Configuration`'s constructor not being thread-safe due to non-thread-safe static state: https://issues.apache.org/jira/browse/HADOOP-10456.  This has been fixed in some newer Hadoop releases, but since it was only reported in April I don't think we can ignore it.  As a result, https://issues.apache.org/jira/browse/SPARK-1097 implements a workaround which synchronizes on an object before calling `new Configuration`.  Currently, I think the extra synchronization logic is only implemented in `HadoopRDD`, but it should probably be used everywhere just to be safe.  I think that `HadoopRDD` was the "highest-risk" place where we might have many threads creating Configurations at the same time, which is probably why that patch's author didn't add the synchronization everywhere.