Fix memory leak in C interface

Memory leak when printing, caught by valgrind. Fix by deleting temporary `Simplifier` object.