A single pre-resolved promise passed to collect fails

because $all_done is already resolved.

Check if $all_done is still in progress before resolving. Tests added.

Fixes #28