Improve performence

When promise is no longer in pending state, run callbacks passed
to .then() directly.