Media conglomerate Hearst Corp. is reshuffling its San Francisco real estate portfolio with plans to acquire a downtown office tower that will be used as a puzzle piece critical to reviving a long-stalled residential project next door to its operational hub.