A fund-raising pact with the Republican Party is expected to replenish the money Donald J. Trump paid his lawyers as he faced three indictments and finished a criminal trial in New York.