Refactoring LinkedList to provide standard deque interface, adding Stack and Queue as simple layers over Dequeue.