Improved Promise.all support for more input variations

`Promise.all` support for promises array, sparse array and non-array
input. Borrowed test suite from cujojs/when.