inserts a new record into a list
insert(phead,predecessor,newpointer)