pocket: Get rid of g_clear_pointer() function

Not available at glib 2.32.