Writers union ratifies its new contract with Hollywood and TV studios