Use g_list_free_full/g_slist_free_full

g_list_free_full/g_slist_free_full requires glib >= 2.28, now we depend on 2.30, so we can use them.