Fixed imap_unordered

The end test of imap_unordered was not properly implemented: need to
check that jobs.nqueued() is null.