“A long and winding legal battle that raised uncomfortable questions about Hollywood’s treatment of middle-aged and older TV writers was settled Friday, a decade after a class-action lawsuit alleged they were the victims of widespread age discrimination.”