The Associated Press’s pact with OpenAI gives it the right to reset terms if another publisher gets a better deal.