Convert from homebrew linked list to BSD TAILQ using OpenBSD r1.38 sys/queue.h

- OpenBSD http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/queue.h rev 1.38
- Convert lList*() to TAILQ_*()
- Minor local variable rename to clarify usage

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>