Convert source files to unix newlines

Most files were converted in ff6b669176, but some (non C++
source files) were left with windows newlines.
Remove trailing whitespace

Most of it was removed in ff6b669176 from C++ source files,
but other files were left unchanged.