Move TokenizeStringUtils and replace CStdString by std::strings.

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