Adding support for promises

Adding support for promises. For now only native Promise.all works but
adding support for non-native Promise.all.