Merge sort on linked list