overhaul of the logging subsystem

Close https://github.com/lualatex/luaotfload/issues/169