lua sort function such like quicksort