Move TokenizeStringUtils and replace CStdStrings by std::strings.

@Karlson2k's commits are a subset of #3097 and will be dropped after that was merged.