Remove duplicates from linked list.