In short stories like “The Immortals” and novels like “The Listeners,” Mr. Gunn helped prepare readers for the future.