title: ConfigObj: prevent writing empty sections
body: <p>I'm using ConfigObj (5.0.6, both on python 2.7 and python 3.8) to manage my configs, but when I'm writing to file config with some sections only presented in configspec, they're appearing only as empty sections, which is not desired. I would appreciate any suggestions of fixing that behaviour of ConfigObj. </p>
  
  <p>Minimal example of what happening:</p>
  
  <pre class="lang-py prettyprint-override"><code>from configobj import ConfigObj
  from validate import Validator
  
  spec = ["[Section]", "option = boolean(default=True)"]
  
  config = ConfigObj(infile={'Section2': {'option2': False}}, configspec=spec)
  config.validate(Validator())
  print(config)
  print(config.write())
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>{'Section2': {'option2': False}, 'Section': {'option': True}}
  ['[Section2]', '    option2 = False', '[Section]']
  </code></pre>
  
  <p>Desired output (there should be no empty sections when writing):</p>
  
  <pre><code>{'Section2': {'option2': False}, 'Section': {'option': True}}
  ['[Section2]', '    option2 = False']
  </code></pre>
  
  <p>Edit 1: I'm using write() to actually write into file so I would prefer not just mess with returned list of strings</p>