newline_char shouldn't return the character

None of the callers are using the return value, so just remove it.
Retain comments

If we're going to round-trip Prolog code, we must treat comments as if
they were terms.  Since Prolog has no native representation of these
terms, we represent them with 'tidylog %...' terms.
Rework comment handling

This is a first step towards modularizing the Prolog DCG.  I want to be
able to use DCGs for parsing and generating, as much as possible.  This
may not be possible with the entire operator precedence parser, but it
should be possible for pieces inside of it (atoms, numbers, comments,
etc).

There's a fair amount of code duplication in tidylog/common.  That's
because I plan to delete tidylog/dcg when this refactoring is all done.
By copying the code over, I can adjust it to suit the new context
without breaking older code.