A bomb-and-gun attack on a mosque in Egypt’s Sinai region killed at least 305 people, including 27 children.