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.
Merge pull request #32 from mstorsjo/cosmetics

Consistently use unix newlines, remove trailing whitespace