Use '\n' as universal line separator for sorting lines

The Document class takes care of detecting and using the correct
platform-specific line separators.