[PATCH 2/3] lib: Replace qsort() with g_qsort_with_data()