The entertainment giant Paramount will merge with Skydance, closing out a decades-long run by the Redstone family in Hollywood and injecting desperately needed cash into a legacy studio that has struggled to adapt to a shifting entertainment landscape.