Replace pep8 with flake8. Strengthen static analysis. Check code on each build.

### Requirements:
* Replace `pep8` package with `flake8`.

### Makefile:
* Use `flake8` to perform style checks.
* `flake8` and `pylint` now target testfiles as well.
* Refine checking so that known deviations aren't flagged.
* Combine `static` and `beauty` targets into `check`.
* Perform `check` on each build.

### Main + Tests:
* Fix `flake8` warnings.