PriorityQueue: add new functionality to avoid excessive wait time

New function NewPriorityQueueWithWaitLimit() added with additional
parameter, waitLimit.