Lint

This adds a good structure for improving the quality of the codebase. For a start I fixed most import-related issues.

Once this gets merged the steps to fix a particular warning are:

* remove it from `setup.cfg`
* clean up all occurrences by running `tox -e lint` and fixing things until the lint target is green.

The tox target also ensures new contributions don't introduce errors/issues that were fixed globally in previous commits.