list.h: implement LIST_APPEND()

this allows O(1) appending of items to a list, this was previously
achieved by LIST_FIND_TAIL followed by LIST_INSERT_AFTER, but this was
O(n).

the name##_other_end field is set if the item is first or last in the
list. it points to the item at the other side:
tail == head->name##_other_end;
head == tail->name##_other_end;

Other notable changes:
- LIST_LOOP_BUT_ONE no longer needs the list head.
- LIST_JUST_US no longer returns true on an item not inside a list.
- LIST_IN_LIST checks wether an item is in a list or not.
udev-list: port to list.h
udev port collect and udevd to list.h
terminal: use list.h
misc list.h cleanup

made all access to the list's field go trough the LIST_* macros