Fix some memory leaks

* destroy Cairo context (drawing) also on early return
* remove referenced but unused string which was read from GtkListStore
* free a string before it's overwritten
* unreference replacement GtkTextBuffer after assignment to GtkTextView
* destroy the main window instead of merely quitting
* free the PangoFontDescription after having finished using it
Switch to more suitable functions for requesting GtkTextIter

* use specialized functions instead of sending 0 and -1 for start and end