Exclude diff-associated FileAttachments from the resource list.

FileAttachments associated with a FileDiff shouldn't be shown in the
list of a review request's file attachments. Exclude them from the list.
A future change will add proper API for setting and getting attachments
on a FileDiff.

Also, while here, I added the missing mimetype field.
Fix all the current pyflakes warnings in the codebase.

This fixes all the warnings pyflakes have found so far. Nothing harmful.
It primarily consists of unused imports. However, it did prevent two
unit tests from running, due to duplicate function names.
Move WebAPIResource and utility methods into webapi/base.py.

This introduces a base.py that contains WebAPIResource, and a bunch of
private utility functions from resources.py. Those have moved into
WebAPIResource as utility functions.
Move webapi/tests.py into webapi/tests/.

This is the first change in a series to split up the webapi unit test
suite. It just moves the existing tests into a new webapi/tests/
subdirectory, and updates testdata file paths to work from the new
location.

No logic has changed, and tests can still be executed as before.
However, you may need to delete your webapi/tests.pyc file.