Fixed memory leaks

Free up all memory on exit so valgrind reports zero leaks. Also fixes leaking one `cstring_t` for every line of text that does not end up in a `line_t`.while parsing (e.g. empty slides)