Add inline singly and doubly-linked lists primitives.
[ci skip]