Fix queue test script - i.e. use the new api
Add a 'next' event to the queue

Emit a 'next' event when dequeue finished successfully and the queue
is not empty. As of now, this is only used in testing.
v0.2.1