Modified queue semantics.

Queue now flushes before deep freeing pointers so only the remaining data in
the queue is freed. This forces the user to free all items dequeued which they
should be doing anyway. If they did this before with the non-flushing queue
then it would result in a double-free.