Hungary’s chief prosecutor, Gábor Bálint Nagy, has resigned as Prime Minister Péter Magyar seeks to replace Orbán-era officials.