Dump configuration to a file

These changes add a way to dump a Configuration to a file.
The order of the keys, comments and newlines from the default configuration are all preserved.

It is capable of doing a roundtrip with the configuration of the example while preserving almost 100% of the original formatting. The only thing that changes at the moment is the format of scalars, here YAML chooses the most restricted form for the value, i.e. no quotes when there are no special characters or escaping, single quotes if there is.