lib: unlink the `next` pointer for FixedQueue to avoid potential memory leaks
In the internal FixedQueue, once a FixedCircularBuffer is used out, it does not unlink the next
pointer, thus if a variable references the head
or tail
field of FixedQueue, it will cause a memory leak. I wrote a reproducing example here. Another way is to make head
and tail
field private, but we need to modify the test cases in test/parallel/test-fixed-queue.js
.