Hamas militants handed over eight hostages – three Israelis and five Thais – amid rowdy scenes in Gaza.