Greece’s embattled prime minister and main opposition leader agreed Sunday to form an interim government to ensure the country’s new European debt deal, capping a week of political turmoil that saw Greece face a catastrophic default that threatened its euro membership and roiled international markets.