Small stuff in list.c

Mainly improve efficiency of r_list_add_sorted