Use proper newline escapes when inspecting strings.

See #1302
Deprecate rather than disallow raw newlines in strings.

Closes #1302