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

Same comment as I made in SQLContext