Hamas has handed over the bodies of the last four Israeli hostages that were included in the first phase of the ceasefire deal to the Red Cross.