Remove duplicates from a linkedlist in place.