Fix whitespace

This involves multiple whitespace-only changes:

- Convert some tab indentation to spaces
- Trim all trailing spaces
- Add final newlines that are missing from some files

Doing a `git diff -w master` will confirm that this is a whitespace-only change.  Adding ?w=1 to the files changed URL also demonstrates this.