The Securities and Exchange Commission said its enforcement director, Andrew J. Ceresney, plans to leave the SEC by the end of the year.