Generic LinkedList implementation.

Data agnostic linked list using reference counting to provide both
implicit sharing and copy on write.