MFC r281181, r281182;sort(1): Cleanups and a small memory leak.Remove custom getdelim(3) and fix a small memory leak.Obtained from: OpenBSD