Write in-house replacement for popt, and deprecate popt.