tests: Various minor leak fixes in the GObject tests