CArchive: fix buffer overrun

Bug fixed: `str.c_str()+(i*BUFFER_MAX)` for wchar_t will shift pointer to double offset.
Use .data() instead of .c_str() as we don't need null termination.

Simple and clearer code for wstrings. Code for string was updated too (for unification).