For decades, comic-book writers have been using the idea of a multiverse to keep superheroes’ conflicting storylines separate.