Implement rlist_swap() and rlist_prev_entry_safe().

Add unit tests.