Fix inconsistent style and add EditorConfig file

For [ticket 22463][].

I haven't yet analyzed the inconsistencies between final newlines in the JSON files.

Some more potential changes that could be made:

- Change code style of JS files to all use 4 spaces for indentation
- Explicitly list each code style (py, xml, js, rst, etc.) instead of using a `*` catch-all section
- Analyze code in tests directory to determine whether some of the inconsistent files (json/xml/po files mostly) should be made consistent

You can confirm that this commit is purely a whitespace change (except for the addition of the `.editorconfig` file) by running git diff -w or using [?w=1][] on Github.

[?w=1]: https://github.com/django/django/pull/2577/files?w=1

Check http://editorconfig.org for more details on EditorConfig.

[ticket 22463]: https://code.djangoproject.com/ticket/22463