Make ToUpper and ToLower properly handle embedded NULLs in the input.

BUG=72517
TEST=included unit test
Review URL: http://codereview.chromium.org/6625046

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77502 0039d316-1c4b-4281-b951-d872f2087c98