Sanitize whitespace, mostly before EOL; fix a few EOL types

I'm about to submit a couple feature branches for review, but as I was working on features I ran into quite a few problems with diffs because there was a tone of junk whitespace at the end of lines and a few files that had inconsistent line ending types.

This patch set should clean all that up. Merging this is a per-requisite for all the other items I'm going to submit PR's for, but having it as a separate patch set should make it easy to review. If there are any problems it is broken up into logical chunks for easy testing with `git bisect`. Also if you have  other feature branches that have not been merged yet having this set separate should make it easier to resolve merge conflicts by rebasing on this first.