Introduce unit testing to the project. Refactor error, lexer and type modules. Fix various bugs.

Lexer:
* Expand public interface of `lexer` module to allow testing.
* Error message during panic-mode recovery outputs state (if relevant).
* Use a LoggerMock if no logger is provided. 
* Rewrite lexing of char and string literals:
  * Simplify and annotate regexes; build master regexes piece by piece.
  * Lex well-formed tokens separately from malformed ones.
  * Use python built-ins to return properly escaped values.
  * Terminate string literals with null byte.
  * Allow empty string literal. Refactor error for empty character literal.
  * Fix return value in literals ending with a single or double quote.
  * Simplify error reporting. Drop errors of char/string literals spanning multiple lines.

Parser:
* Completely delegate construction of type nodes to `type` module.
* Move default `start` argument out of `parse` function, to enable unit testing of individual grammar rules.

Error:
* DRY: Merge `DummyLogger` and `LoggerMock`.

Type:
* Add map of built-in types from `parser`.
* Add error reporting for built-in type redefinition.

Tests:
* Add almost complete unit tests for `lexer` module.
* Add almost complete unit tests for `type` module.
* Drop functional tests replaced by unit tests.

misc:
* Beautify code. Fix some `pylint` warnings.
* Fix typos and wrong comments.
They are raw strings and don't contain any special character: `r'\n' == '\\n'`. There is no newline to be consumed by Python.

Why shouldn't the comparison between the parsed token and `explode` succeed? Suppose an input file contains a dquote, a backslash, an `n` and another dquote. The lexer will lex it as `"\\n"`, then unescape it, producing `"\n"`, as is the intention of the programmer. This is exactly how `explode` works.

In fact, this particular testcase would *never* fail as a result of bad escaping, because the equivalent of `explode` is used inside the lexer. The testcase's purpose is only to verify that the string regex works correctly, not that the lexer does proper escaping. The escaping tests come first in `test_sconst`.