optimize AtLeastOnceDelivery

motivation:
the current implement use unconfirmed.size,which maybe a little overhead

result:
by add a private filed ,will clean out the overhead