QPID-7453: [Java Broker] Hand off selection task only if connection tasks need to be processed This change also prevents iterator garbage if there are no connection tasks to be done.