bugfix: i3ipc-glib memory leaks

Properly free the i3ipc-glib connection and the replies from queries.