doubly linked list: implement erase()