Fixed working with array-like object in Promise.all() and friends.

Prevously, the code while iterating over an array-like object did not
take into account objects with absent elements.  As a result, the
resulting array object was returning with elements containing garbage
values.

The fix is to allocate and fill the resulting array object on the fly.

This closes #538 issue on Github.
2 files changed