Tre personer som hållits gisslan av terrorstämplade Hamas har lämnats över till Röda korset i södra Gaza.