use platform newline in tests and XML reports

Two unit tests fail on Windows:
- testReportJunit used "\n" in expected result, but on Windows the expected output is "\r\n".
- testReportXml exposed a (minor) bug: the XML report used a mixture of \n and \r\n newlines.

With this PR all tests pass.