Copy double linked list with arbitrary pointers