Add .editorconfig for cross-editor configuration

See http://editorconfig.org/ for more.

Also added newline characters at the end of the files.