Scopely has agreed to acquire Niantic's games business, which includes Pokémon Go, in a deal valued at $3.5 billion.