Code style

Fix random whitespace issues (found and fixed using [this script](https://github.com/treyhunner/editorconfig-tools)) and add a somewhat verbose `.editorconfig` file.