Remove dependency on current platform's EOL style.

Lexer behaviour currently changes depending on the host platform, which is undesirable considering it's probably user input, and the EOL style used by the user is beyond our control. This PR:

- Provides support for all standard EOL styles
- Improves the consistency of lexer output
- Allows finer control of EOLs in rendered output