Begin a code cleanup effort starting with some trailing whitespace

Sorry for the huge diff. I tried to split the commits out so that they were easier to approve. I walked through vim replacement for trailing whitespace to make sure the replacements being made wouldn't affect the code. I'm honestly just learning the code a bit while doing some cleanup. I'll probably remove whitespace from the rest of the files soon and move on to indentation consistency and then making sure that preprocessor if/else blocks are clearly marked and indented.