Fixing Queue.clear() method

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