CAIRO — The Egyptian president, Mohamed Morsi, has fired back at Israel from the arsenal of diplomacy as Israeli strikes on the Gaza Strip confront him with a wrenching test of loyalties, to Hamas and to Egypt’s landmark peace treaty with Israel.