tidy check for vim and emacs modelines
See #10719.
It skips *.webidl files for now since I am not sure where they come from and if they should be edited in tree or not.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10786)
<!-- Reviewable:end -->
This is a new attempt of #10586, after Simon Sapin's great cleanups in #10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
- also update requriements "pyflakes" from 0.8 to 0.8.1 due to following issue
```
Traceback (most recent call last):
File "/Users/Askeing/software/servo/python/_virtualenv/bin/servo-tidy", line 5, in <module>
from pkg_resources import load_entry_point
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3084, in <module>
@_call_aside
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
f(*args, **kwargs)
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3097, in
_initialize_master_working_set
working_set = WorkingSet._build_master()
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 653, in _build_master
return cls._build_from_requirements(__requires__)
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in
_build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 839, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyflakes==0.8.1' distribution was not found and is required by servo-tidy
```
Package tidy
This fixes https://github.com/servo/servo/issues/861.
@askeing, I've copied your work from https://github.com/askeing/servo_tidy and attributed the commit to you. My commit in this PR is Git housekeeping to preserve `tidy`'s history. If you'd like to make additional changes, I've given you and @shinglyu push access to my fork of Servo. Apologies if this is already familiar, but the workflow for pushing to my branch is:
```
$ git remote add edunham git@github.com:edunham/servo.git
$ git checkout -b package-tidy
$ git pull edunham package-tidy
$ git push edunham package-tidy
```
Once this lands, I'll look at how to publish it to PyPI and automate that process.
Please don't merge this yet; we still need to discuss how the change should work around https://github.com/servo/servo/blob/master/python/servo/testing_commands.py#L33 , as I've yet to figure out how to get the egg to actually expose its tests.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10590)
<!-- Reviewable:end -->
https://github.com/servo/servo/issues/861#issuecomment-209547756
"I think the most important concern is that it's possible to modify tidy.py
and see how those changes affect ./mach test-tidy with the fewest possible
intermediate steps." - jdm
This takes publishing complexity away from the contributor when testing
changes and makes it an infra problem instead, where it's much easier to
automate & saner to manage pypi credentials