Ken Kies, who held two top jobs at the Treasury Department and the I.R.S., is leaving the government.