Fix Issue 11017 - Improve performance of toLower etc.

Changed to use `appender` instead of repeated `~=`.

https://d.puremagic.com/issues/show_bug.cgi?id=11017
Reserve appender length for the common case
Merge pull request #1957 from Poita/bug11017

Fix Issue 11017 - Improve performance of toLower etc.