The deal brings Israel and Hamas a step closer to ending their deadliest and most destructive fighting ever.