Handle carriage return in log payload.

Make Util.escape() strip carriage return from payload when followed by
newline, and replace with newline when not.
Merge pull request #133 from markusbk/log-format-cr

Handle carriage return in log payload.