Reverse link list in one pass