Separate TextFileWPimplWithBuf that derives from TextFileWPimpl, because most saving routines are not depending on an intermediate buffer.
Make generic ReadLine() implementation from ReadBuf with limited buffer size.
Get rid of all crazy realloc stuff, much simpler and safer and faster when saving a file with a Huge line.
Avoid intermediate buffer when making a simple WideCharToMultibyte convertion and instead directly use the file buffer.
Reduce file buffer a little because it is not slower with 32kB and slightly slower with 1KB, but much slower with 128KB. Maybe even lower values could make sense.