Fix stack overflow in async.queue

It happened when too many synchronous tasks were queued.

Fix #413