Remove possibility for endless loop - report items not processed/updated via debug log.
Queue.php reworked to only go through the queue once to process any items with a outq_scheduled time before the start of the invocation. Previous changes caused the process to run until there were NO items left in the queue with a outq_scheduled time that had already passed.
The current changes are necessary because in some instances, items in the queue are not properly being handled and remain in the queue with an outq_scheduled time before 'now'. This causes an endless loop. The result is the number of Queue.php invocation grows and eventually causes server overload as all the processes continuously attempt to deliver the failed item(s).
If queue items are handled properly, all items should be processed or updated and given a future outq_scheduled time with each run of Queue.php. As a result, there SHOULD be NO items left in outq with an outq_scheduled time before this copy of Queue.php was started. If there are items left after this run of Queue.php does it's work, it indicates a problem of some sort that requires investigation. Any items with a outq_scheduled time before the start of this invocation that remain after processing are reported in the DEBUG log for further investigation (i.e., something is broken in a delivery procedure somewhere that needs to be fixed).