replace qsort_r with g_qsort_with_data
rename pixfmt_compat.h to compat.h
stop calling pthread_yield
move OS-specific thread id related functions to compact.h