test for curses in c++ mode, change/restore CXXFLAGS
* edit.h, kern.cc: (write_loop) new function to handle partial writes; use it in WriteBlock function.
* loadsave.cc: use write_loop; increase file copy buffer size; show warning if file size changes as we copy the file.
log changes