add sort method

The CLinkList_sort takes advantage of qsort.