Hollywood was on guard for a walkout that may have far-reaching effects in a dispute about fair pay in the streaming era when television and movie writers announced that they will go on strike for the first time in 15 years.