Fix resetting scoped config defaults

It would write an empty object for the parent key when there were no other objects in the parent key.

The settings view will call `atom.config.restoreDefault` for every option when viewing a language package. This fix will only save if the value changes, and will never set an empty object. 

Closes #4175