Fixing Queue.clear() method

It threw a NoSuchElementException when deleting the last element in the Queue. In case of CircularQueue the method is overridden to make it faster.