Changing _compose() to support promises.

Compose would now handle promises returned by any
of the composed functions. The resulting function
will evaluate to a promise if any one of the
composed functions returns a promise. If all of
the composed functions return something other than
a promise, then the behaviour of compose() is the
same as it was before. In this sense the change is
fully backwards compatible.