fix(balancer) remove the correct upstream event from queue
fix(balancer) remove the correct upstream event from queue

 here the `i` variable is an index to a copy of the event queue, but
 then it's used to remove the event from the original queue.  As soon as
 one item is removed, the indexes don't match and the wrong event is
 removed.

 this patch works on the first event and then removes the first item on
 each iteration.

 If an event results in an error, the loop is aborted and it's not
 removed from the queue, just as previously.  If the error is
 persistent, no other event is processed.  Consider moving failed events
 to the tail of the queue.

Kong/kong,Kong/kong,Kong/kong