Greece’s embattled prime minister and the head of the main opposition party reached an initial agreement tonight to form an interim government that will ensure the country’s new European debt deal and then lead Greece to early elections, the president’s office said.