Fix lost characters when emitting folded scalars with carriage returns.
Fix newline handling problems in folded scalars.
Emit multi-line scalars in folded style by default.
Move classes to their own files.