Rival Egyptian parties signed a document renouncing violence during a meeting called by the country’s top Islamic scholar.