Add support for different line endings

The Server-Sent Events spec describes that line endings can be U+000D U+000A, U+000A, or U+000D. This changes supports that.