The C tokenizer's common.h redefines malloc/realloc/free to the
PyObject_* family but left calloc pointing at libc. Entity parsing in
Tokenizer_really_parse_entity allocates with calloc and later releases
the buffer with free (= PyObject_Free), which is undefined behavior:
under PYTHONMALLOC=debug it aborts in _PyMem_DebugRawFree, and
otherwise it can silently corrupt the heap.
Route calloc through PyObject_Calloc alongside the other allocator
macros so both calloc sites match the surrounding free.
Fixes#352.
pytest is the preferred way to write and run unit tests these days and
it has a cleaner interface - so lets switch to it. The tokenizer tests
especially are much easier to read/understand.
This was mostly done with find/replace regexes and then cleaned up
manually.