Issue #20498: Fixed io.StringIO tests for newline='\n'. Added new tests.