Add .editorconfig

Use EditorConfig to define a some basic styling rules for code.  This
should also help to reduce the number of commits introducing trailing
whitespace.

See http://editorconfig.org/ for details.
Merge pull request #1227 from tarleb/editorconfig

Add .editorconfig