The first Israeli hostages and Palestinian prisoners have been released following a long-awaited ceasefire agreement between Israel and Hamas.