The eventname handling code was splattered all over the place. Collect it in a single source file and use C++ idioms to avoid nasty memory management. Provide a C-only interface, however. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>