Short answer: Using a Candle of Invocation to Call a creature involves more than just the candle, so there is no broken infinite cycle.
Warning:
This answer relies on rules interpretations with which not everyone agrees. Unless proven otherwise, I do not believe that Paizo or Wizards have given authoritative answers that directly contradict these interpretations.
Long answer:
Part One: The candle is not sufficient to call a creature.
The cost of the Candle of Invocation at 8,400 gp is in the neighborhood of what a potion of a 9th-level spell would be (9 x 17 x 50 = 7,650). The difference would be due to the additional benefits of the candle, and the 7,650 gp may be somewhat discounted because of the alignment restriction. This pricing seems to pretty clearly leave out Gate's 10,000 gp material component from Pathfinder or 1000 XP component of D&D (which translates into 5,000 gp). I take this to be a clear indication that the optional XP or costly material component are not included in the item.
A Gate spell can be used either for Planar Travel or for Calling Creatures. Calling Creatures is an optional use of the spell, and the use that requires the extra component. Given my rationale above, the user of a Candle of Invocation to call a creature would have to provide the "10,000 gp in rare incense and offerings" (Pathfinder) or 1000 XP (D&D) in order to use the Gate spell to Call a creature. While I grant that the general rule is that a magic item includes the XP or costly material component, this is an additional cost that is not required if you use Gate for Planar Travel. As such, given the pricing, I think it is reasonable to require the gold or XP from the user of the candle.
Part Two: The creature may require expensive or unusual payment.
I would say that providing wishes is a "more involved form of service," and thus "you must offer some fair trade in return for that service" over and above the incense and offerings.
Some would argue that the timeframe of providing wishes is short enough that you do not need to bargain for them. Pathfinder does not give a precise timeframe for a non-negotiable command, which opens the door up for my interpretation. D&D, sadly, spells out that "other actions that can be accomplished within 1 round per caster level counts as an immediate task; you need not make any agreement or pay any reward for the creature’s help." 17 rounds is 102 seconds. That's actually not a whole lot of time. Saying, "grant me three wishes!" and the actual casting of the spell may only take a single round, but fully explaining what you wish for can take more time.
Regardless of the exact time required (which not everyone would be willing to disregard), I think the precise phrase, "longer or more involved," indicates that a task may require additional compensation even if the task isn't longer, otherwise the clause "or more involved" is pointless.
So, if you grant that, for example, an Efreeti using his only daily opportunity to grant a non-genie three wishes is "more involved" than fighting a battle or playing Minute-to-Win-It, then the user of the candle must also make a deal with the creature as per the Planar Ally spells. This involves additional costs based on the power of the creature and the kind of service to be rendered. I have always understood the "100 gp per HD of the creature called" price to be a guideline for the minimum. Since a Wish spell can create a single non-magical item worth up to 25,000gp, I would assume that the wish-granter would desire something even more valuable than that (either magic, rare, or straight-up more costly).
There is also this great tidbit in the Gate spell: "Some creatures may want their payment in 'livestock' rather than in coin, which could involve complications." I would have to imagine that whatever the creature would want in exchange for a Wish spell would be something that could not be wished into existence. Livestock is actually a great little example, as Wish spells cannot create creatures. Don't Efreet like slaves?
Part Three: Pick one.
Regardless of the price you put on the Wish spells from the called creature, or the optional component for the candle, as long as the price is something that cannot be paid trivially by using the second of three Wish spells, you do not have an infinite cycle. Honestly, I'm not sure that a Wish spell can even generate 10,000 gp in rare incense and offerings, unless a single giant block of incense meets the need of the spell.