Changing how newlines are handled

This commit perserves the newline system of the JSON CPP fast-writer
as requested in
https://github.com/draios/sysdig/pull/138#issuecomment-41636808
by instead truncating the last character which we know is going to
be a newline.