The settlement would end the battle for control over Redstone's $40 billion empire that includes Viacom and CBS.