advanceQueue
Advances the queue to the next queue on flush. This carries over the generation to the next queue and set the .getMaxSeqNo based on the given maxNumPendingOps. This method can only be called once, subsequently the returned queue should be used.
Return
a new queue as a successor of this queue.
Parameters
maxNumPendingOps
the max number of possible concurrent operations that will execute on this queue after it was advanced. This corresponds to the number of DWPTs that own the current queue at the moment when this queue is advanced since each these DWPTs can increment the seqId after we advanced it.