Line ending conversion should be able to handle strings with null chars.

Currently the line ending normalization functions returns an empty string
when a string including null characters is given.
This CL fixes the behavior.

BUG=274983
R=tkent

Review URL: https://codereview.chromium.org/60903004

git-svn-id: svn://svn.chromium.org/blink/trunk@161908 bbb929c8-8fbe-4397-9dbb-9b2b20218538