Israel and Hamas committed war crimes, UN says