combine_notes_cat_sort_uniq(): sort and dedup lines all at once