Use Python logging for error reporting. Cleanup code. Automate some static analysis.

This sequence of commits addresses issues #1, #3 and #4.

The `error.py` module is refactored; bookkeeping is outsourced to the Python `logging` module. Appropriate changes are made across other modules to use the new interface.
Also included:
1) `Makefile` targets for static analysis using `pylint` and `pep8`.
2) Cleanup of unused code in `lexer.py`
3) Some code grooming.
That's struck me, too. There is indeed a re.ASCII, though there wasn't one in Python2.

I suspect the pylint installed via apt-get is the one for Python 2. I pip-installed pylint for Python 3 and now it doesn't report any error.