liblist-c : update pops method. Reset ptr to null before returning element.