Deque implemented as a linked list in C