The long trek home by Palestinians comes as mediators helped end twin crises over ceasefires in Gaza and Lebanon.