Consumer DNA-testing company 23andMe Inc. is in talks to go public through a roughly $4 billion deal with VG Acquisition Corp., a special purpose acquisition company founded by billionaire Richard Branson, according to people familiar with the matter.