Strip trailing whitespace from all source files and add unix-style newlines at eof

I haven't looked *too* carefully at everything I stripped, but it passes QUnit and everything *seems* to work fine.