shared: implement c_list_sort() as non-recursive merge-sort
This is still the very same approach (in the way the array is split and how elements are compared). The only difference is that the recursive implementation is replaced by a non-recursive one. It's (still) stable, top-down merge-sort. The non-recursive implementation better, because it avoids the overhead of the function call to recurse.
Showing with 39 additions and 13 deletions