Refactored case-conversion functions.

StrToLower() returns a modified copy of the string, InPlaceLowercase() modifies the string in-place.
Merge pull request #1285 from mc-server/StrCaseRefactor

Refactored case-conversion functions.