A multiday electronic music festival on Randalls Island was canceled on Sunday, after city officials said two concertgoers had died and at least four others had fallen critically ill during the first two days of the event.