A one-year-old girl is among at least 39 people who were killed in an Israeli attack on a beach cafe in Gaza.