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.
lexpos is useful and hasn't been removed. The diff doesn't match the reality.
lexmatch wasn't used and it probably won't be used in the future.

The setters are all gone, because there is no reason to interfere with the lexer status manually, unless we want to do some really advanced error recovery. I had put the "NotImplementedError" there already, but I find it kind of weird to have code saying "I am not here".

Exporting the entire PLY interface was definitely overengineering. It helped me familiarize with PLY, but it is not needed.