Remove trailing spaces in all js files

So that everyone can use auto removal of trailing spaces without generating
unwanted diff lines. Only white space changes, nothing else.
This also adds newlines at the end of files that didn't have them.

Files used in testing fixtures are not affected.

The command used:
sed -i '' 's/[[:space:]]*$//g' **/*.js