tests/sloppy-dumptypes: be _GNU_SOURCE before including liballocs.h.
Support outputting messages to a file other than stderr. Clean up some API details while doing so.
Support output to streams other than stderr. Various robustness fixes. Tolerate reentrant allocation hook invocation during initialization when hitting early_malloc.