Use g_list_free_full/g_slist_free_full

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