SAN FRANCISCO—The company behind Second Life, the community-building online fantasy whose popularity spiked a decade ago, is preparing a third life — this time with a social virtual-reality venture.